RE: [PHP-DB] Relational database
| From: | Hunter, Ray | Date: | Thu, 21 Mar 2002 13:39:43 +0000 |
| Subject: | RE: [PHP-DB] Relational database | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17800@lists.php.net to get a copy of this message | ||
Try this:
SELECT ccsd.Description, ccsd.Impact, ccsd.Isolation FROM ccsd, log WHERE
ccsd.logccsd=log.logccsd;
You cannot specify a database is = to a row...
Thank you,
Ray Hunter
Firmware Engineer
ENTERASYS NETWORKS
-----Original Message-----
From: Ron [mailto:allenr@fwd.areur.army.mil]
Sent: Thursday, March 21, 2002 6:32 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Relational database
I am trying to get fields from 2 different tables that have the same field
name to pull the records from one table For example
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable toconnect to
database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName");
$sqlquery1 = mysql_query("SELECT Description, Impact, Isolation" . "FROM
ccsd, log WHERE ccsd=log.logccsd");
while ($query = mysql_fetch_array($sqlquery1)) {
$CCSD = $query["CCSD"];
$Description = $query["Description"];
$Impact = $query["Impact"];
$Isolation = $query["Isolation"];
}
This code is not working.....help please.........yes I am a newbie!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php