473,325 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

SQL Running in mysqlcontroll but not in php

I have an sql statement to setup a few tables and it runs in
mySQLcontrol and even PHPMyAdmin, but it fails to run when starting it
in php. The error I get is

"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 '"
it then lists part of the begining of the statement.

I'm running XP IIS 5.1
MYSQL : 4.0.18-nt
PHP : 4.3.3.3

The statement is :

DROP TABLE IF EXISTS S4AS_Clips;
CREATE TABLE S4AS_Clips(
clip_ID Int( 11 ) unsigned NOT NULL AUTO_INCREMENT ,
clip_FileName Varchar( 16 ) default NULL ,
clip_Name Varchar( 30 ) default NULL ,
clip_Author Varchar( 30 ) default NULL ,
clip_Description Varchar( 100 ) default NULL ,
clip_Votes Int( 11 ) default 0,
PRIMARY KEY ( clip_ID )
) TYPE = MYISAM;
DROP TABLE IF EXISTS S4AS_Competitions
CREATE TABLE S4AS_Competitions(
comp_ID Int( 11 ) unsigned NOT NULL AUTO_INCREMENT ,
comp_Votable bool default 0,
comp_Winner Int( 11 ) default 0,
comp_Date TIMESTAMP( 16 ) ,
comp_Description Varchar( 100 ) default NULL ,
PRIMARY KEY ( comp_ID )
) TYPE = MYISAM ;

Any clues what it could be. The connection works fine with other SQL
statements. The connection code is bellow:
define("sys_dbhost", "localhost");
define("sys_dbuser", "mike");
define("sys_dbpasswd", "");
define("sys_dbname", "VideoUpload");

$db = mysql_connect(sys_dbhost, sys_dbuser, sys_dbpasswd);
mysql_select_db(sys_dbname, $db);
if (mysql_query($mySql, $db)) {
echo("Created!");
}

Thanks in advance,
Mike.

Jul 20 '05 #1
0 1120

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ross Presser | last post by:
OK, I've been researching this problem and can't find a definitive answer yet. The situation is one that seems to have come up a few times to different folks. I am writing an application that...
4
by: Bill Dika | last post by:
Hi I am trying to calculate a running total of a calculated textbox (tbAtStandard) in GroupFooter1 for placement in a textbox (tbTotalAtStandard) on my report in Groupfooter0. The problem...
1
by: Ennio-Sr | last post by:
Hi all! Testing a script where I need to make sure that postgresql is running before passing a <psql dbasename -c "insert into ..." > instruction I faced this curious behaviour: This is the...
1
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the...
7
by: pradeep_TP | last post by:
hello all, I want to know how can I check whether a web site us running or not. I have used HttpWebRequest but when I give a web site address, It takes few number of seconds to throw exception...
3
by: Anil Kumar Sharma | last post by:
Hello, I am working on C# using vs.net 2003. I have faced two interesting problems. 1. Dynamically setting Default Button: I created a form and used it in various contexts. On basis of the...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
2
by: upperclass | last post by:
Hi, I'm trying to find a decent way to measure program running time. I know clock() is probably the standard way of doing it but clock_t overflows too quickly. The target program running time...
1
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.