php - You have an error in your SQL syntax - unable to find error -
I think there is a sytax error inside my code but can not see why.
The queue in question is here:
mysqli_query ($ db, inserting in `` `` `` `` parent``````````` `` `` `` `` ` , `Going`,` Distance`, `Class`,` Place`, `Losing_Dist`,` Stall`, `Horse`,` Weight`, `Trainer`,` Odds`, `Oddsmovement`,` Jockeys_Claim`, ` Comments`, `Race_Name`) values ('$ id', '$ thedate', '$ thecourse', '$ noinrace', 'going $', '$ distance', '$ square', '$ place' '$ Distance_bt', '$ stall', '$ horse', '$ weight', '$ thetrainer', '$ odds', '$ oddsmovement', '$ thejockey', '$ comments', '$ event') ") Or die (mysqli_error ($ Database));
and I get the full error
There is an error in your SQL syntax; Pass' My ', '22 / 1', '25 / 1 & lt; To use the correct syntax, check the manual related to your MySQL server version. The line in which it says is near: '$ thetrainer', '$ odds <221', 'd nolan', '', 'Royal Marine' at line 1
For any more information, please, '$ the $ oddsmovement', '$ the jockey'
is set to databases so that all areas are varchat (250) parent ID and id aparent from I know that the values in your PHP variable are valid:
This should work:
<> mysqli_query ($ db pre, "putting in horse (date, track, runner, going, distance, class, plow S, Losing_Dist, Stall, Horse, Load, Trainer, Odds Oddsmovement, Jockeys_Claim, Comments, Race_Name Value ({$ Thedate} {$ thecourse} {$ noinrace} {going $} {$ distance} {$ class} {$ Place} {$ distance_bt} {$ stall} {$ horse}, {$ weight} {$ thetrainer} {$ barriers} {$ oddsmovement} {$ thejockey} {$ comments} {$ incident}) ") or die (mysqli_error ($ Database)); As mentioned in the above comments, if it is a public page, then you should protect SQL injection. Many techniques are just Google if you are unsure of how.
Comments
Post a Comment