Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-09-2004, 10:50 PM   PM User | #1
dniwebdesign
Regular Coder

 
dniwebdesign's Avatar
 
Join Date: Dec 2003
Location: Carrot River, Saskatchewan
Posts: 838
Thanks: 15
Thanked 9 Times in 9 Posts
dniwebdesign is an unknown quantity at this point
Syntax Error?

Here is the PHP code in question:

PHP Code:
            $result=mysql_query("UPDATE hockeystats_gs_penalties SET hper01='$hper01', hpfn01='$hpfn01', hpln01='$hpln01', hsfn01='$hsfn01', hsln01='$hsln01', hmin01='$hmin01', hoff01='$hoff01', htim01='$htim01', hper02='$hper02', hpfn02='$hpfn02', hpln02='$hpln02', hsfn02='$hsfn02', hsln02='$hsln02', hmin02='$hmin02', hoff02='$hoff02', htim02='$htim02', hper03='$hper03', hpfn03='$hpfn03', hpln03='$hpln03', hsfn03='$hsfn03', hsln03='$hsln03', hmin03='$hmin03', hoff03='$hoff03', htim03='$htim03', hper04='$hper04', hpfn04='$hpfn04', hpln04='$hpln04', hsfn04='$hsfn04', hsln04='$hsln04', hmin04='$hmin04', hoff04='$hoff04', htim04='$htim04', hper05='$hper05', hpfn05='$hpfn05', hpln05='$hpln05', hsfn05='$hsfn05', hsln05='$hsln05', hmin05='$hmin05', hoff05='$hoff05', htim05='$htim05', hper06='$hper06', hpfn06='$hpfn06', hpln06='$hpln06', hsfn06='$hsfn06', hsln06='$hsln06', hmin06='$hmin06', hoff06='$hoff06', htim06='$htim06', hper07='$hper07', hpfn07='$hpfn07', hpln07='$hpln07', hsfn07='$hsfn07', hsln07='$hsln07', hmin07='$hmin07', hoff07='$hoff07', htim07='$htim07', hper08='$hper008', hpfn08='$hpfn08', hpln08='$hpln08', hsfn08='$hsfn08', hsln08='$hsln08', hmin08='$hmin08', hoff08='$hoff08', htim08='$htim08', hper09='$hper09', hpfn09='$hpfn09', hpln09='$hpln09', hsfn09='$hsfn09', hsln09='$hsln09', hmin09='$hmin09', hoff09='$hoff09', htim09='$htim09', hper10='$hper10', hpfn10='$hpfn10', hpln10='$hpln10', hsfn10='$hsfn10', hsln10='$hsln10', hmin10='$hmin10', hoff10='$hoff10', htim10='$htim10', hper11='$hper11', hpfn11='$hpfn11', hpln11='$hpln11', hsfn11='$hsfn11', hsln11='$hsln11', hmin11='$hmin11', hoff11='$hoff11', htim11='$htim11', hper12='$hper12', hpfn12='$hpfn12', hpln12='$hpln12', hsfn12='$hsfn12', hsln12='$hsln12', hmin12='$hmin12', hoff12='$hoff12', htim12='$htim12', hper13='$hper13', hpfn13='$hpfn13', hpln13='$hpln13', hsfn13='$hsfn13', hsln13='$hsln13', hmin13='$hmin13', hoff13='$hoff13', htim13='$htim13', hper14='$hper14', hpfn14='$hpfn14', hpln14='$hpln14', hsfn14='$hsfn14', hsln14='$hsln14', hmin14='$hmin14', hoff14='$hoff14', htim14='$htim14', hper15='$hper15', hpfn15='$hpfn15', hpln15='$hpln15', hsfn15='$hsfn15', hsln15='$hsln15', hmin15='$hmin15', hoff15='$hoff15', htim15='$htim15', hper16='$hper16', hpfn16='$hpfn16', hpln16='$hpln16', hsfn16='$hsfn16', hsln16='$hsln16', hmin16='$hmin16', hoff16='$hoff16', htim16='$htim16', hper17='$hper17', hpfn17='$hpfn17', hpln17='$hpln17', hsfn17='$hsfn17', hsln17='$hsln17', hmin17='$hmin17', hoff17='$hoff17', htim17='$htim17', hper18='$hper18', hpfn18='$hpfn18', hpln18='$hpln18', hsfn18='$hsfn18', hsln18='$hsln18', hmin18='$hmin18', hoff18='$hoff18', htim18='$htim18', hper19='$hper19', hpfn19='$hpfn19', hpln19='$hpln19', hsfn19='$hsfn19', hsln19='$hsln19', hmin19='$hmin19', hoff19='$hoff19', htim19='$htim19', hper20='$hper20', hpfn20='$hpfn20', hpln20='$hpln20', hsfn20='$hsfn20', hsln20='$hsln20', hmin20='$hmin20', hoff20='$hoff20', htim20='$htim20', hper21='$hper21', hpfn21='$hpfn21', hpln21='$hpln21', hsfn21='$hsfn21', hsln21='$hsln21', hmin21='$hmin21', hoff21='$hoff21', htim21='$htim21', hper22='$hper22', hpfn22='$hpfn22', hpln222='$hpln22', hsfn22='$hsfn22', hsln22='$hsln22', hmin22='$hmin22', hoff22='$hoff22', htim22='$htim22', hper23='$hper23', hpfn23='$hpfn23', hpln23='$hpln23', hsfn23='$hsfn23', hsln23='$hsln23', hmin23='$hmin23', hoff23='$hoff23', htim23='$htim23', hper24='$hper24', hpfn24='$hpfn24', hpln24='$hpln24', hsfn24='$hsfn24', hsln24='$hsln24', hmin24='$hmin24', hoff24='$hoff24', htim24='$htim24', hper25='$hper25', hpfn25='$hpfn25', hpln25='$hpln25', hsfn25='$hsfn25', hsln25='$hsln25', hmin25='$hmin25', hoff25='$hoff25', htim25='$htim25', hper26='$hper26', hpfn26='$hpfn26', hpln26='$hpln26', hsfn26='$hsfn26', hsln26='$hsln26', hmin26='$hmin26', hoff26='$hoff26', htim26='$htim26', hper27='$hper27', hpfn27='$hpfn27', hpln27='$hpln27', hsfn27='$hsfn27', hsln27='$hsln27', hmin27='$hmin27', hoff27='$hoff27', htim27='$htim27', hper28='$hper28', hpfn28='$hpfn28', hpln28='$hpln28', hsfn28='$hsfn28', hsln28='$hsln28', hmin28='$hmin28', hoff28='$hoff28', htim28='$htim28', hper29='$hper29', hpfn29='$hpfn29', hpln29='$hpln29', hsfn29='$hsfn29', hsln29='$hsln29', hmin29='$hmin29', hoff29='$hoff29', htim29='$htim29', hper30='$hper30', hpfn30='$hpfn30', hpln30='$hpln30', hsfn30='$hsfn30', hsln30='$hsln30', hmin30='$hmin30', hoff30='$hoff30', htim30='$htim30', vper01='$vper01', vpfn01='$vpfn01', vpln01='$vpln01', vsfn01='$vsfn01', vsln01='$vsln01', vmin01='$vmin01', voff01='$voff01', vtim01='$vtim01', vper02='$vper02', vpfn02='$vpfn02', vpln02='$vpln02', vsfn02='$vsfn02', vsln02='$vsln02', vmin02='$vmin02', voff02='$voff02', vtim02='$vtim02', vper03='$vper03', vpfn03='$vpfn03', vpln03='$vpln03', vsfn03='$vsfn03', vsln03='$vsln03', vmin03='$vmin03', voff03='$voff03', vtim03='$vtim03', vper04='$vper04', vpfn04='$vpfn04', vpln04='$vpln04', vsfn04='$vsfn04', vsln04='$vsln04', vmin04='$vmin04', voff04='$voff04', vtim04='$vtim04', vper05='$vper05', vpfn05='$vpfn05', vpln05='$vpln05', vsfn05='$vsfn05', vsln05='$vsln05', vmin05='$vmin05', voff05='$voff05', vtim05='$vtim05', vper06='$vper06', vpfn06='$vpfn06', vpln06='$vpln06', vsfn06='$vsfn06', vsln06='$vsln06', vmin06='$vmin06', voff06='$voff06', vtim06='$vtim06', vper07='$vper07', vpfn07='$vpfn07', vpln07='$vpln07', vsfn07='$vsfn07', vsln07='$vsln07', vmin07='$vmin07', voff07='$voff07', vtim07='$vtim07', vper08='$vper08', vpfn08='$vpfn08', vpln08='$vpln08', vsfn08='$vsfn08', vsln08='$vsln08', vmin08='$vmin08', voff08='$voff08', vtim08='$vtim08', vper09='$vper09', vpfn09='$vpfn09', vpln09='$vpln09', vsfn09='$vsfn09', vsln09='$vsln09', vmin09='$vmin09', voff09='$voff09', vtim09='$vtim09', vper10='$vper10', vpfn10='$vpfn10', vpln10='$vpln10', vsfn10='$vsfn10', vsln10='$vsln10', vmin10='$vmin10', voff10='$voff10', vtim10='$vtim10', vper11='$vper11', vpfn11='$vpfn11', vpln11='$vpln11', vsfn11='$vsfn11', vsln11='$vsln11', vmin11='$vmin11', voff11='$voff11', vtim11='$vtim11', vper12='$vper12', vpfn12='$vpfn12', vpln12='$vpln12', vsfn12='$vsfn12', vsln12='$vsln12', vmin12='$vmin12', voff12='$voff12', vtim12='$vtim12', vper13='$vper13', vpfn13='$vpfn13', vpln13='$vpln13', vsfn13='$vsfn13', vsln13='$vsln13', vmin13='$vmin13', voff13='$voff13', vtim13='$vtim13', vper14='$vper14', vpfn14='$vpfn14', vpln14='$vpln14', vsfn14='$vsfn14', vsln14='$vsln14', vmin14='$vmin14', voff14='$voff14', vtim14='$vtim14', vper15='$vper15', vpfn15='$vpfn15', vpln15='$vpln15', vsfn15='$vsfn15', vsln15='$vsln15', vmin15='$vmin15', voff15='$voff15', vtim15='$vtim15', vper16='$vper16', vpfn16='$vpfn16', vpln16='$vpln16', vsfn16='$vsfn16', vsln16='$vsln16', vmin16='$vmin16', voff16='$voff16', vtim16='$vtim16', vper17='$vper17', vpfn17='$vpfn17', vpln17='$vpln17', vsfn17='$vsfn17', vsln17='$vsln17', vmin17='$vmin17', voff17='$voff17', vtim17='$vtim17', vper18='$vper18', vpfn18='$vpfn18', vpln18='$vpln18', vsfn18='$vsfn18', vsln18='$vsln18', vmin18='$vmin18', voff18='$voff18', vtim18='$vtim18', vper19='$vper19', vpfn19='$vpfn19', vpln19='$vpln19', vsfn19='$vsfn19', vsln19='$vsln19', vmin19='$vmin19', voff19='$voff19', vtim19='$vtim19', vper20='$vper20', vpfn20='$vpfn20', vpln20='$vpln20', vsfn20='$vsfn20', vsln20='$vsln20', vmin20='$vmin20', voff20='$voff20', vtim20='$vtim20', vper21='$vper21', vpfn21='$vpfn21', vpln21='$vpln21', vsfn21='$vsfn21', vsln21='$vsln21', vmin21='$vmin21', voff21='$voff21', vtim21='$vtim21', vper22='$vper22', vpfn22='$vpfn22', vpln22='$vpln22', vsfn22='$vsfn22', vsln22='$vsln22', vmin22='$vmin22', voff22='$voff22', vtim22='$vtim22', vper23='$vper23', vpfn23='$vpfn23', vpln23='$vpln23', vsfn23='$vsfn23', vsln23='$vsln23', vmin23='$vmin23', voff23='$voff23', vtim23='$vtim23', vper24='$vper24', vpfn24='$vpfn24', vpln24='$vpln24', vsfn24='$vsfn24', vsln24='$vsln24', vmin24='$vmin24', voff24='$voff24', vtim24='$vtim24', vper25='$vper25', vpfn25='$vpfn25', vpln25='$vpln25', vsfn25='$vsfn25', vsln25='$vsln25', vmin25='$vmin25', voff25='$voff25', vtim25='$vtim25', vper26='$vper26', vpfn26='$vpfn26', vpln26='$vpln26', vsfn26='$vsfn26', vsln26='$vsln26', vmin26='$vmin26', voff26='$voff26', vtim26='$vtim26', vper27='$vper27', vpfn27='$vpfn27', vpln27='$vpln27', vsfn27='$vsfn27', vsln27='$vsln27', vmin27='$vmin27', voff27='$voff27', vtim27='$vtim27', vper28='$vper28', vpfn28='$vpfn28', vpln28='$vpln28', vsfn28='$vsfn28', vsln28='$vsln28', vmin28='$vmin28', voff28='$voff28', vtim28='$vtim28', vper29='$vper29', vpfn29='$vpfn29', vpln29='$vpln29', vsfn29='$vsfn29', vsln29='$vsln29', vmin29='$vmin29', voff29='$voff29', vtim29='$vtim29', vper30='$vper30', vpfn30='$vpfn30', vpln30='$vpln30', vsfn30='$vsfn30', vsln30='$vsln30', vmin30='$vmin30', voff30='$voff30', vtim30='$vtim30',  WHERE gametype='$gametype' AND gamenumber='$gamenumber'",$connection) or print mysql_error(); 

and here is the good old error I get with it:

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 'WHERE gametype='' AND gamenumber=''' at line 1


Now before you say check line 1 of my code that is just an open statement for
PHP Code:
<?php
and everything else worked fine. This isn't much different from my other querys, just a few bits longer.
__________________
Dawson Irvine
CEO - DNI Web Design
http://www.dniwebdesign.com
dniwebdesign is offline   Reply With Quote
Old 04-09-2004, 10:59 PM   PM User | #2
raf
Master Coder


 
Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
raf will become famous soon enoughraf will become famous soon enough
Quote:
Originally Posted by dniwebdesign
Now before you say check line 1 of my code that is just an open statement for
PHP Code:
<?php
and everything else worked fine. This isn't much different from my other querys, just a few bits longer.
Hahahaha.
I's line one of the sql-statement --> it's a mysql-errormessages that is outputted by PHP, not a PHP error

Anywayy the problem is the ',' before the ' where' --> you need to remove it
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
raf is offline   Reply With Quote
Old 04-10-2004, 01:08 AM   PM User | #3
dniwebdesign
Regular Coder

 
dniwebdesign's Avatar
 
Join Date: Dec 2003
Location: Carrot River, Saskatchewan
Posts: 838
Thanks: 15
Thanked 9 Times in 9 Posts
dniwebdesign is an unknown quantity at this point
Yea, well, I've been up since 10:30 AM yesturday (gonna have a good sleep tonight, for sure).

Thanks, works now. I should have caught that myself.
__________________
Dawson Irvine
CEO - DNI Web Design
http://www.dniwebdesign.com
dniwebdesign is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:19 AM.


Advertisement
Log in to turn off these ads.