Jump to content

[SOLVED] Simple Query Problem


phpretard

Recommended Posts

Why do I Get:  It's a simple update...

 

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='7cf93e806305aefc7495c8dca49f090f'' at line 1

 

 

$ReceiverNumber="123456";
$key="md5('2 emails')";


mysql_query("update preferred_list_new set ReceiverNumber='$ReceiverNumber', Status='Active' where Key='$key' ");

 

I can't even count how many times I've updated a database.

Link to comment
https://forums.phpfreaks.com/topic/155958-solved-simple-query-problem/
Share on other sites

Like this?

 

		$CheckRegistrationStatus = mysql_query("select Email, MemberID from users where Email = '".mysql_escape_string($receiver)."'");

	if (mysql_num_rows($CheckRegistrationStatus) == 1) {
		while($row=mysql_fetch_array($CheckRegistrationStatus)){
		$ReceiverNumber=$row['MemberID'];
		}
		$update_preferred=mysql_unbuffered_query("update preferred_list_new set ReceiverNumber='$ReceiverNumber', Status='Active' where Key='$key' ");
		echo $update_preferred; //<<<<<<<<
		exit; //<<<<<<<<

		redirect("index.php?ma=user_acceptinvitation");
	} else {
		if ($UserType == "Lender") {
			redirect("index.php?ma=register&t=7f5b0c220104c053887a2950c204bcb3");
		} elseif ($UserType == "Appraiser"){
			redirect("index.php?ma=register&t=43e561fc584ef009b5ee5bbd2e6eb162");
		}
	}

 

Page goes blank

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.