View Single Post
Old 02-05-2008, 03:14 PM   #3 (permalink)
StevenF
The Contributor
 
Join Date: Jan 2008
Posts: 87
Thanks: 49
StevenF is on a distinguished road
Default

Quote:
Originally Posted by RobertK View Post
One problem is that, I think, mySQL doesn't like double quotes. However, you'll never get a match because variables in single quoted strings aren't escaped.

So:
SQL Code:
WHERE athlete_number = $ud_athletenumber';
Should be:
SQL Code:
WHERE athlete_number = '.$ud_athletenumber;
Oh, I see. I had the single quote at the end to close to whole query, like so:

Code:
$query = 'UPDATE althlete SET 	
	
   athlete = "'.mysql_real_escape_string($ud_name).'",
   regno = "'.mysql_real_escape_string($ud_regno).'",
   gender = "'.mysql_real_escape_string($ud_gender).'",
   age = "'.mysql_real_escape_string($ud_age).'",
   eventno = "'.mysql_real_escape_string($ud_eventno).'",
   distance = "'.mysql_real_escape_string($ud_distance).'",
   stroke = "'.mysql_real_escape_string($ud_stroke).'",
   time = "'.mysql_real_escape_string($time).'",
   place = "'.mysql_real_escape_string($place).'",
   WHERE athlete_number = $ud_athletenumber';
However, I changed it to what you wrote and it made no difference. Thanks though :)
__________________
My Personal and Photo Blog
StevenF is offline  
Reply With Quote