Re: Re: Retrieve information from mutiple tables

From: Date: Mon, 22 Apr 2002 08:40:05 +0000
Subject: Re: Re: Retrieve information from mutiple tables
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-18715@lists.php.net to get a copy of this message
On Monday 22 April 2002 16:04, Prodoc wrote: > It's a no go... > > This is what I tryed: > > "SELECT User.NickName FROM User, Rights WHERE (User.UserID = > Rights.UserID && (Rights.MainID = ${row['MainID']} || > ISNULL(Rights.MainID))" > > The only thing I want to be able to retrieve is a list of nicknames > (User.NickName) based on MainID. In the Rights Table the MainID value > has to be NULL or = ${row['MainID']} Does the simple case (without specifying MainID) work? And are you pretty sure that $row['MainID'] actually holds a valid value? Have you tried printing the whole of the above query to see what it actually contains? If it looks valid try copy-paste that query into the mysql command-line to see what comes up. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Ask five economists and you'll get five different explanations (six if one went to Harvard). -- Edgar R. Fiedler */

« previous php.db (#18715) next »