RE: [PHP] Multiple Queries
| From: | Arthur Pelkey | Date: | Thu, 15 Jan 2004 15:58:35 +0000 |
| Subject: | RE: [PHP] Multiple Queries | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174668@lists.php.net to get a copy of this message | ||
$result = mysql_query("SELECT * FROM classes3 WHERE c_d_sun='1' AND
c_s_sun_1_hr='5'");
while($row = @ mysql_fetch_array($result)) {
if($row[c_s_sun_1_hr] != 5) {
echo "n/a";
} else {
echo
"$row[c_s_sun_1_hr]:$row[c_s_sun_1_min]$row[c_s_sun_1_dn]<br>";
echo "<a title=\"$row[c_desc]\">$row[c_title]</a>";
}
}
I have multiple segments of this, the query and the formatting are
different, is there another way to go about this?
-----Original Message-----
From: Humberto Silva [mailto:humberto@telelista.pt]
Sent: Thursday, January 15, 2004 10:52 AM
To: apelkey@northeastquality.com
Subject: RE: [PHP] Multiple Queries
Can you paste the code please...
Humberto Silva
World Editing
Portugal
-----Original Message-----
From: Arthur Pelkey [mailto:apelkey@northeastquality.com]
Sent: quinta-feira, 15 de Janeiro de 2004 15:46
To: php-general@lists.php.net
Subject: [PHP] Multiple Queries
I am new this.
I have a page that has multiple queries on it, I want to do doing the
following:
Query a mysql db multiple times in the same page, but i must be missing
something, I keep getting these AFTER the first queryis successful:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in /path/php_file.php on line line_number
Can someone point in the right direction on how to do multiple queries,
some are not querying the same db btw.
-Art
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php