MySQL+PHP select one row
From: Robert Chares (robert.chares_at_s1999.tu-chemnitz.de)
Date: 03/23/04
- Next message: Karl Heinz Marbaise: "Re: MySQL+PHP select one row"
- Previous message: deko: "Re: cookies and php - basics"
- Next in thread: Karl Heinz Marbaise: "Re: MySQL+PHP select one row"
- Reply: Karl Heinz Marbaise: "Re: MySQL+PHP select one row"
- Reply: Matthias Esken: "Re: MySQL+PHP select one row"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Mar 2004 09:38:34 +0100
Hello,
I'm sure it has been asked a thousand times before, but still:
How can I access a particular row in my MySQL table via PHP?
The background is just to update the values of one row in the table via
a html form with the old values already filled in.
What I tried so far ist sth like this:
$row=mysql_query('SELECT * FROM names WHERE ID=$entry');
for ($i = 0; $i < mysql_num_fields($row); $i++)
{
echo("<td>$row[$i]</td>\n");
}
The mistake should be that mysql_query does not return a vector, but
still a table...
Does anybody have a good idea how to solve that problem?
Thx
Robert
- Next message: Karl Heinz Marbaise: "Re: MySQL+PHP select one row"
- Previous message: deko: "Re: cookies and php - basics"
- Next in thread: Karl Heinz Marbaise: "Re: MySQL+PHP select one row"
- Reply: Karl Heinz Marbaise: "Re: MySQL+PHP select one row"
- Reply: Matthias Esken: "Re: MySQL+PHP select one row"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|