Monday, December 21, 2009

Write a simple program to get a row of information from a database?

$myrow = mysql_query("SELECT name,email FROM visitors ORDER by name LIMIT
1");
$data = mysql_fetch_row($myrow);
$name = $data[0];
$email = $data[1];
echo "A row from the database is name $name and email $email";

No comments:

Post a Comment

I just got my #domain @BigRock. Get upto 25% off with my personalized coupon link Get upto 25% off