Jump to content

This is driving me nuts!


Recommended Posts

This insert query looks to be alright, however I get this error:


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, online) VALUES ('0', '8', 'nothing@poop.com', 'first', 'last', 'a3' at line 1


Here is the actually query:

//This is only a snippet
function makeKey($id){
$key .= $id.rand(0, 10); //To Be Unique 
for($j=0; $j<=3; $j++){
	$key .= rand(11, 20);
for($k=0; $k<=3; $k++){
	$key .= rand(21, 30);
return $key;
	$key = makeKey($id);
	INSERT INTO ".TBL_PEOPLE." (id, level, email, first, last, password, activated, key, online) 
	VALUES ('$id', '$level', '$db_email', '$db_first', '$db_last', '$db_pass', '0', '$key', '0')
	")or die(mysql_error());


Any ideas? Maybe I am just tired.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.