You are here: Put MySQL queries into variables « PHP Programming Language « IT news, forums, messages
Put MySQL queries into variables

Posted by Darren on 11/24/05 13:20

The following query returns 7 codes, how do I put each of them into a
separate variable?

$result = mysql_query("SELECT day_plan FROM calorie_plan WHERE calories
= '$calories'");
if (!$result) {
die('Invalid query: ' . mysql_error());
}
while ($row = mysql_fetch_array ($result))
{
$day_plan = $row['day_plan'];
}

I'm sure I've done this before but I can't remeber how or where.

Many thanks

Darren

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация