[GLLUG] Retrieving a row from mysql
sbdataspiller at sbcglobal.net
Mon Feb 16 15:19:19 EST 2004
I'm working on my database project (See 'MySql: Database inside of a
It was suggested that I have an account number in each table.
So now for example my table is
(The real table has a lot more info, but hopefully this demonstrates
what I'm trying to do)
Table name: players
name - accountnum - blah -blah
Seth -- 12 -- y - n
You --- 34 --- y -k
Blah - N -- more -- no
I have a query like this in php:
$name = 'Seth';
$tablename = 'players'
query = mysql_query("SELECT * FROM $tablename WHERE name= '$name' AND
When I run this, I get a message saying that I have an error in my
syntext and to check the manuel for my version of MySql for the right
syntext to use near " at line 1.
I specified accountnum in the table creation script as
accountnum int(10) unsigned NOT NULL
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linux-user