Randy Burgess <[EMAIL PROTECTED]> wrote:
> Apologies for what is a pitifully simple question from someone who has
> just started using MySQL 4.0. I've looked in the documentation and
> elsewhere, but can't find the exact syntax for adding comments to
> columns when creating a table. My attempts
Apologies for what is a pitifully simple question from someone who has
just started using MySQL 4.0. I've looked in the documentation and
elsewhere, but can't find the exact syntax for adding comments to
columns when creating a table. My attempts at guessing the syntax so far
have failed. Tips,
>" 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
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
WHERE index = $
From: Scott Yamahata [mailto:[EMAIL PROTECTED]
> At the command prompt, I'm supposed to type:
>
> mysql -h host -u user -p
>
> Does that mean that I type, for example:
>
> mysql -h localhost -u admin -p
>
> with localhost=host and admin=user?
>
> When I'm asked for the password, I hit return
At the command prompt, I'm supposed to type:
mysql -h host -u user -p
Does that mean that I type, for example:
mysql -h localhost -u admin -p
with localhost=host and admin=user?
When I'm asked for the password, I hit return and it lets me in.
But if I try to create a database, by using:
GRAN