Re: php mysql comparing two rows in two columns for username and passwort
| From: | Peter Lind | Date: | Thu, 29 Apr 2010 14:49:09 +0000 |
| Subject: | Re: php mysql comparing two rows in two columns for username and passwort | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47098@lists.php.net to get a copy of this message | ||
On 29 April 2010 16:44, Alexander Schunk <aschunk@gmail.com> wrote:
> Hello,
>
> i have it now as follows:
>
> while($dbbenutzer = mysql_fetch_assoc($sqlbenutzername))
> while($dbpasswort = mysql_fetch_assoc($sqlpasswort)){
You have things very twisted. Check the code posted by Karl - you only
need *ONE* row containing your *TWO* fields. mysql_fetch_assoc()
retrieves that *ONE* row from a MySQL result set as an array - so
having those two while statements will do you no good.
Regards
Peter
--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>