The answer to this is quite simple if you look in a manual. mysql_query returns a resource id from which you extract the results using things like mysql_result() or mysql_fetch_object() or mysql_fetch_row(). Look up the manual on those commands.
On Tuesday 24 August 2004 13:24, Phpu wrote: > Hi, > I have a table with 2 fields: id_from and id_to. > I want to interogate the database and to display the results if the id_to > is equal to some current id OR id_from id_from is equla to saame current > id. > > I use this but doesn't work > > $sql = "SELECT id_from, id_to FROM ids WHERE id_from ='$current_id' OR > id_to='$current_id' "; $result = mysql_query($sql); > > How can i do? > > Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php