Jump to content

just get one entry from table


android6011

Recommended Posts

<?php
$sql = "SELECT `age` FROM `table` WHERE `id`='$id'";
$result = mysql_query($sql) OR DIE (mysql_error());
if (mysql_num_rows($result))
{
$row = mysql_fetch_assoc($result)
{
	echo "<p>Your age is {$row['age']}!</p>";
}
}
else
{
// no rows returned but valid query
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.