Reply to Newbie: How to display query result in table?

Your name:

Reply:


Posted by Huevos on 07/06/06 04:36

I scanned through hundreds of posts and tried several variations on some
promising posts, but have not succeeded yet... All I want to do (to start)
is have a web page display a table of the result of a query.

I am using MySQL via geocities.yahoo.com. The MySQLAdmin auto generated a
PHP version of my query as follows:

$sql = 'SELECT * FROM `Varieties` WHERE 1'
. ' ORDER BY `nHeight` DESC, `nDiameter` DESC, `nMinTemp` ASC,
`tSun` DESC LIMIT 0, 30 ';


I tried to merge this into code from another suggestion in these groups and
came up with:

<HTML>
<HEAD>
</HEAD>
<BODY>
<?
// DATABASE QUERY
$bamboo='SELECT * FROM `Varieties` WHERE 1'
. ' ORDER BY `nHeight` DESC, `nDiameter` DESC, `nMinTemp` ASC,
`tSun` DESC LIMIT 0, 30 ';
$result= mysql_query($bamboo);
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>LINK 1 DETAILS HERE<br>
DATABASE QUERY: <? $result; ?></td>
</tr>
</table>
<? } ?>
</BODY>
</HTML>

Can anyone offer a suggestion?
Thanks in advance!

Jeff Hawkins

[Back to original 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

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