Only displaying single rows value

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
ridwan
Forum Commoner
Posts: 55
Joined: Thu Aug 22, 2002 3:15 am

Only displaying single rows value

Post by ridwan »

I am using the following code to run through a table and show me all of it's rows but I only get a single row displayed :

Code: Select all

$strSQL = "SELECT * FROM suppliers ORDER BY їContentId]";
    $result= odbc_exec( $dbConnection, $strSQL);

		//get resultset and transform into object
		While (odbc_fetch_row($result));			{
		//retrieve needed info from object

	echo "<tr><td>" .  odbc_result($result, "ContentId") . "</td><td>" . odbc_result($result, "Name")........
Does anyone know why this is so?? :?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please don't cross-post. Choose the most relevant forum for your question and post there. If you feel you initially posted your question in the wrong forum, delete the first post before reposting.

Anyone wishing to help:
viewtopic.php?t=7261&highlight=

Mac
Locked