Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need Help with database output

2 views
Skip to first unread message

nagendra prasad

unread,
Aug 28, 2010, 7:33:36 AM8/28/10
to phpex...@yahoogroups.com, PHP DB, php-w...@lists.php.net, php mysql
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.

nagendra prasad

unread,
Aug 30, 2010, 12:14:17 PM8/30/10
to phpex...@yahoogroups.com, PHP DB, php-w...@lists.php.net, php mysql
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.

Phansys Corp

unread,
Aug 28, 2010, 3:57:05 PM8/28/10
to nagendra prasad, phpex...@yahoogroups.com, PHP DB, php-w...@lists.php.net, php mysql
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 <nagendr...@gmail.com>

nagendra prasad

unread,
Aug 30, 2010, 1:28:59 PM8/30/10
to Vinay Kannan, phpex...@yahoogroups.com, PHP DB, php-w...@lists.php.net, php mysql
yep if you want to make a slight changes like some color or some space
change you can always use the code tab in the Dreamweaver :). I fee very
easy to change minor codes in the coding tab rather then using menus and
stuff :)

Vinay Kannan

unread,
Aug 30, 2010, 1:01:01 PM8/30/10
to nagendra prasad, phpex...@yahoogroups.com, PHP DB, php-w...@lists.php.net, php mysql
Whats Dreamweaver php codes. It automatically does the coding ?? Never even
knew about such a thing

Thanks,
Vinay

On Mon, Aug 30, 2010 at 9:44 PM, nagendra prasad
<nagendr...@gmail.com>wrote:

Bastien Koert

unread,
Aug 30, 2010, 12:16:30 PM8/30/10
to nagendra prasad, phpex...@yahoogroups.com, PHP DB, php-w...@lists.php.net, php mysql

I suggest you google for search engine script and start from there

--

Bastien

Cat, the other other white meat

0 new messages