php-windows Digest 30 Aug 2010 16:14:43 -0000 Issue 3858
Topics (messages 30312 through 30313):
Re: Need Help with database output
30312 by: Phansys Corp
30313 by: nagendra prasad
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Hi Nagendra!
<?php
///...require to $link_resource mysql
$query = 'SELECT Col1, Col2, Col3 FROM table';
$rs_query = mysql_query($query, $link_resource);
$row_rs_query = mysql_fetch_assoc($rs_query);
$total_row_rs_query = mysql_num_rows($rs_query);
if ($total_row_rs_query > 0) {
echo
'<table><thead><tr><th>Col1</th><th>Col2</th><th>Col3</th></tr></thead>';
do {
echo '<tr><td>', $row_rs_query['Col1'], '</td><td>', $row_rs_query['Col2'],
'</td><td>', $row_rs_query['Col3'], '</td></tr>';
} while($row_rs_query = mysql_fetch_assoc($rs_query));
echo '</table>';
}
mysql_free_result($rs_query);
?>
2010/8/28 nagendra prasad <nagendra802...@gmail.com>
> Hi All,
>
> I have a database and I want to show it in 3 columns Like
>
> Col1 Col2 Col3
> data1 data2 data3
> data4 data5 data5
> ........ ....... ........
>
>
> I tired using table but its not working. Please help me.
>
> Best,
> guru.
>
--- End Message ---
--- Begin Message ---
Hi All,
Thanks for all your replies. I have found what I needed. I used Dreamweaver
to show the database in 3 different columns. However now I don't know how to
add a search engine to it. Right now its showing all the records in my
database in 3 columns. Now I want to put a search engine code so that user
can search data whatever he wants. I see the difference in normal php codes
and Dreamweaver php codes. Please suggest me how to add a search engine
script to the existing 3 column script.
Best,
Guru.
--- End Message ---