I have a select query through mysql,
how would i display it onto my webpage?
I have a select query through mysql,
how would i display it onto my webpage?
how would u just put in the first item in that row?
do you mean limit the query to only 1 row?
$query = mysql_query("SELECT id, name FROM table LIMIT 1");
while ($row = mysql_fetch_array($query))
{
$id = $row['id'];
$name = $row['name'];
}
Add your code so we can see what you are talking about.
Warning: mysql_fetch_array() expects parameter 1 to be resource, object given
i keep getting this error
nm fixed, error
Hey, that’s really easy, - for example W3Schools shows a useful example: