put
echo mysql_num_rows($result);
before
while ($line = mysql_fetch_array($result))
and add
print_r($line)
inside the while loop
is $line empty? paste _some_ of that output.
On Fri, 04 Mar 2005 10:52:59 +0530, chintan <[EMAIL PROTECTED]> wrote:
> and as aniruddh's suggestion i was unable to prin
and as aniruddh's suggestion i was unable to printout any raws
it just prints tables fieldname
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the output looks like this
CompanyName 641002
AddressLine1641002
AddressLine2641002
City641002
PostalCode 641002
it goes to the last field only not one by one
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
u already seem to have a table-like format (after u make the changes
graeme mentioned) to get it as
CompanyName :Data
Address :Data
City:Data
Zipcode :Data
i'm assuming u want to do something like
CompanyName Address City Zipcode
:Data:Data :Data
Try putting your print "\t$col_value\n" immediately after the foreach...
foreach ($line as $col_value)
print "\t$col_value\n";
remember to remove teh semi-colon after the foreach line.
graeme.
chintan wrote:
as usual my database is in mysql
and there are lots of records available
i had wrote
as usual my database is in mysql
and there are lots of records available
i had wrote my script like this
$link = mysql_connect("localhost", "chintan","hellomysql")
or die("Could not connect");
mysql_select_db("chintan") or die("Could not select database");
$query = "SELECT *
There's not enough information from your question to provide a good answer..
Where are you getting the data from?
Is there more than one record available?
-Micah
On Monday 28 February 2005 11:05 pm, chintan wrote:
> Hi forum
> i have a simple problem
> as im new to php how do i set the outpu