Re: displaying certain columns

From: Date: Mon, 01 Oct 2001 02:21:58 +0000
Subject: Re: displaying certain columns
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69407@lists.php.net to get a copy of this message
$result = mysql_db_query($dname, $sql); $row = mysql_fetch_object($result); echo "$row->field_name"; -- Justin Garrett "Melih Onvural" <melih@bellsouth.net> wrote in message news:HHEKIFCGOCEGCKHMPLEHGEMKCCAA.melih@bellsouth.net... > i have a database and it randomly selects one piece of data from a table of > quotes, but it will only print the quote when I include the row that it's > picked with. I have my SELECT statement at > > $sql = "SELECT $dbrow FROM $dbtable ORDER BY RAND() LIMIT 1"; > > and then to display the result > > $result = mysql_db_query($dbname, $sql) > > > then in the code, > > print "<td> $result </td>"; > > what do i need to add? (the result is Resource id #3) > > thank you, > Melih > >

« previous php.general (#69407) next »