RE: show a field in php file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
...a lot of stuff from George....
[/snip]

George,

We appreciate that you are asking a lot of questions and hope that you
become a proficient user of PHP. We do recommend that you spend some
time with a tutorial or two (Google is your friend) and a little time
with the manual. Many of your questions are answwered and often there is
more than one way to do things.

Thank you.

To show a field from a query you have to 

a. get the data from a query

$myQuery = "SELECT foo FROM table ";
if(!($myResult = mysql_query($myQuery, $myConnection))){
	echo mysql_error . "\n";
	exit();
}

while($myRow = mysql_fetch_array($myResult)){
	echo $myRow['foo'] . "<br>\n";
}

b. display the data

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux