![]() |
|
#1
|
|||
|
|||
MySQL Syntax ErrorI got this error message when I was about to create a table in the database:
MySQL said: 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 '" . QUIZ_TABLE . " ( quiz_id mediumint(8) unsigned DEFAULT Here's the whole code I used to create a new table... Maybe some of you here knows how to make it work? My version of MySql is 4. Quote:
anyone help! |
|||
|
#2
|
||||
|
||||
|
I am confused; is this part of a SQL batch file or PHP script?
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
Sorry for the confusion...
Yes this is part of a PHP script, and this part that I have taken is essential to be done. I dont know how to convert this to MySQL syntax but from what I see they dont have much difference... Any helping hand here? Thanks! |
|
#4
|
||||
|
||||
Running MySQL statements together through an arrayLooks like an install / upgrade script... anyway, here's what I would have done:
I would 'build' those different SQL queries into an array, then run them off the array using a foreach() loop; like this: PHP Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in | ukrspp21 | MySQL / PHP Forum | 33 | 02-Sep-2009 20:42 |
| phpMyAdmin error | austinstace | MySQL / PHP Forum | 8 | 24-Aug-2007 21:42 |
| Including Maps and strings?? | maddie | C++ Forum | 17 | 05-Jul-2004 07:25 |
| [script] E-mail webmaster error page | BobbyDouglas | PHP Code Library | 0 | 19-Aug-2003 21:10 |
| Windows: From only £20p/y,Linux: from $10p/m. ASP, ASP.NET, PHP, Free MySQL, +More | EyotaHosts | Web Hosting Advertisements & Offers | 0 | 28-Jun-2003 14:54 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The