tick mark `
| From: | Craig Hoffman | Date: | Mon, 22 Mar 2004 15:54:49 +0000 |
| Subject: | tick mark ` | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33603@lists.php.net to get a copy of this message | ||
Why is it when I have this ` tick mark in my query it works fine, but when I remove them it I get an error?
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 'interval, heartrate, morning_hr, hr_for_intervals, watts, rpms,
Here is my query:
$query = "INSERT INTO traininglog (
user_id , power_level , weight , comments , workout , distance , time , interval , heartrate , morning_hr , hr_for_intervals , watts , rpms , date , time_upload , week_of , sleep , motivation , workout_name , rpe , candence , crunchs , leg_raises , situp_with_twist , superman , situps , russian_twist , back_extensions , situp_crunchs , side_crunchs , balance_bicycles , v_ups , leg_rotation , medicine_ball_throw , pull_ups , push_ups , climbing ) VALUES ($_POST[user_id], '$_POST[power_level]', $_POST[weight], '$_POST[comments]', '$_POST[workout]', '$_POST[distance]', '$_POST[time]' '.'
'$_POST[interval]', $_POST[heartrate], $_POST[morning_hr], $_POST[hr_for_intervals], $_POST[watts], $_POST[rpms], $_POST[date], NOW('$_POST[time_upload]') '.'
'$_POST[week_of]', $_POST[sleep], '$_POST[motivation]', '$_POST[workout_name]', $_POST[rpe], $_POST[candence], $_POST[crunchs], $_POST[leg_raises], $_POST[situp_with_twist] '.'
$_POST[superman], $_POST[situps], $_POST[russian_twist], $_POST[back_extensions], $_POST[situp_crunchs], $_POST[side_crunchs], $_POST[balance_bicycles], $_POST[v_ups] '.'
'$_POST[leg_rotation]', $_POST[medicine_ball_throw], $_POST[pull_ups], $_POST[push_ups], '$_POST[climbing]' )";__________________________________
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: choffman@eclimb.net
w: www.eclimb.net
_________________________________