server status scripts

server status scripts


server status scripts
Help with MySQL string please?

Hi guys

I've been wondering why this keeps erroring but for the life of me cant work it out...
I have so far managed to work out that if i take out the WHERE condition everything works fine but with it in it messes up any thoughts?

Error Message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = 'XXXXXXXXXXXXXXXXXXXXXXXXX' LIMIT 1' at line 1

(i have blanked out my key with X's - there are ONLY letters and numbers)

Sql String:
$get_data = "SELECT domain,status FROM cms_keylist_valid WHERE key='".$key_string."' LIMIT 1";
$do_get_data = mysql_query($get_data);

I have $key_string setup properly erlier on in the script

Thanks in advance!
(In reply to politicaly correct): Yes, i do need the LIMIT 1 and ive tried gettin rid of that before nd had no luck ty tho

It is pooping out over the LIMIT 1. Do you need this? Try without it, like this

......key='".$key_string."'";

Edit: try this way for testing
'SELECT * FROM `cms_keylist_valid` WHERE `key`= 'put a valid key here' LIMIT 0, 30 ';

[phpbay]server status scripts, 30, "11211"[/phpbay]
[phpzon]server status scripts, 5, Electronics[/phpzon]

[IRP] Media - [IRP] Roleplay GTASAMP

Leave a Reply