>" Query failed : 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 'index = 21' at line 3"
I believe 'index' is a reserved word, usually used for creating indexes.
Using it as a field in a table could quite lik
> $query="SELECT * FROM women WHERE 'id=$id'";
This would result in something like:
SELECT * FROM women WHERE 'id=1'
Do you see the error here?
$query="SELECT * FROM women WHERE id=$id";
or
$query="SELECT * FROM women WHERE id='$id'";
would be better...
Tips for debugging this in PHP:
- print th
thanks for clearing that up!
Kip Gordon
- Original Message -
From: Michael Stassen
To: Kip Gordon
Cc: [EMAIL PROTECTED]
Sent: Saturday, May 08, 2004 10:05 PM
Subject: Re: Another Stupid Newbie Question ^.^
Kip Gordon wrote:
> I connect to my data base...
>
Kip Gordon wrote:
I connect to my data base...
$dbh=mysql_connect ("localhost", "kipples_women", "") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("kipples_hotwomen");
and then I issue a query..
$query="SELECT *
FROM women