php-general | 2001092
Date: 09/30/01
- Next message: Justin Garrett: "[PHP] Re: Making variable global / accessing variable"
- Previous message: Melih Onvural: "[PHP] displaying certain columns"
- In reply to: Melih Onvural: "[PHP] displaying certain columns"
- Next in thread: Christian Dechery: "Re: [PHP] displaying certain columns"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
$result = mysql_db_query($dname, $sql);
$row = mysql_fetch_object($result);
echo "$row->field_name";
-- Justin Garrett"Melih Onvural" <melih <email protected>> wrote in message news:HHEKIFCGOCEGCKHMPLEHGEMKCCAA.melih <email protected> > 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 > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Justin Garrett: "[PHP] Re: Making variable global / accessing variable"
- Previous message: Melih Onvural: "[PHP] displaying certain columns"
- In reply to: Melih Onvural: "[PHP] displaying certain columns"
- Next in thread: Christian Dechery: "Re: [PHP] displaying certain columns"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

