php-db | 2001041
Date: 04/11/01
- Next message: Larry Hotchkiss: "[PHP-DB] mysql and LIKE"
- Previous message: Anderson Sone: "[PHP-DB] Blob or Link?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Can you use max within a select function?
This is where I have it...
$cd_qry = 'select max(code) from equipment';
connecttodb();
$result = mysql_query($cd_qry);
$temp = mysql_fetch_row($result);
$bcode = $BCODE_START . str_pad((substr($temp[0], -6) +
1),6,'0',STR_PAD_LEFT);
However, I'm getting an error that says "Supplied argument is not a valid
MySQL result resource in
/usr/local/nusphere/apache/htdocs/ese-lab/Protect/add.php3 on line
162". The line beginning with $temp is line 162... would this be why?
I'm using MySQL 3.23.33 and PHP 4.0.4 .
Thanks,
Liz
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Larry Hotchkiss: "[PHP-DB] mysql and LIKE"
- Previous message: Anderson Sone: "[PHP-DB] Blob or Link?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

