On Wednesday 07 April 2004 21:18, Mignon Hunter wrote:
> I never saw this email come across - I think it got caught in spam software
> on 4-1

Check the archives.

> ********************************************************
>
> Well I'm still working on this off and on - still having problems :|
>
> I couldnt get the foreach to work properly..I keep getting:
>
> "Invalid argument supplied for foreach() ".
>
> I've tried lots of different stuff but here's an example:
>
> *****************************************************
>
> $query = "SELECT * FROM cust";
> $res = mysql_query($query, $ups_conn) or die(mysql_error());
>
> $query2 = "SELECT * FROM contact";
> $res2 = mysql_query($query2, $ups_conn) or die(mysql_error());
>
> while ($row = mysql_fetch_assoc($res)) {
>       while ($row2 = mysql_fetch_assoc($res2)) {

I've no idea what you're trying to do. Are the tables 'cust' and 'contact' 
related in any way? What is the relation? And shouldn't the relation be 
reflected in your queries? And if so your second query should be inside your 
outer while-loop.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
Now I lay me back to sleep.
The speaker's dull; the subject's deep.
If he should stop before I wake,
Give me a nudge for goodness' sake.
                -- Anonymous
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to