Click here to Skip to main content
15,170,971 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
this is line 3 -->if (!$con)
die('Could not connect' . mysql_error());

mysql_select_db("kyle", $con);

always appears in the browser as "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 '')' at line 3"

i am opening it as "http" not "file" and i am using phpmyadmin on xp, with apache and mySQL running, anyone have any ideas?
Updated 13-Feb-10 4:48am

If you've got a MySQL syntax error, then you must be connected to the server. Where it says "at line 3" it means line 3 of an SQL query, not the PHP.
Please check your connection String.
Is ur password="password" and ur username="username" ?
if not ,use ur username and password in connecting to ur GUI mySQL...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900