RE: [PHP-DB] Date rows
| From: | Adam Jackson | Date: | Wed, 10 Oct 2001 03:10:17 +0000 |
| Subject: | RE: [PHP-DB] Date rows | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13176@lists.php.net to get a copy of this message | ||
im not too sure if im correct or not cos im only new to php/mysql,
but by the looks of it you have a mysql_query twice, which i think would
just loop around.
i would have
while ($row = mysql_fetch_row($result) {
let me know how you go
-Adam
-----Original Message-----
From: Devon [mailto:martin@enet21.com.au]
Sent: Wednesday, 10 October 2001 12:53 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Date rows
Below is my script were I am trying to print specific rows of a data base by
using date as the ID, I do not recieve any output can someone please help>?
<?php
$host = "192.168.1.203";
$user = "sc";
$password = "sc";
$dbname = "Syd-01";
$tablename = "Port1";
$date = "2001-10-05";
$link = mysql_connect ($host, $user, $password);
$query = mysql_query("SELECT * FROM $tablename WHERE date='$date'");
$result = mysql_db_query($dbname, $query, $link);
while ($Row = mysql_query ($Result)) {
print $row[indata];
print $row[outdata];
}
mysql_close($link);
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net