This is the error that I've gotten since I switched servers a week-ish
ago. No idea why, doesn't make any sense to me. I'm running MySQL 3.23
and the latest versions of Apache and PHP. We used the nusphere install.
Warning: Supplied argument is not a valid MySQL result resource in
/usr/local/nusphere/apache/htdocs/ese-lab/Protect/add.php3 on line 162
Any ideas??? Thanks!!!
Liz Bander
This is the function that it's in:
#======================================================================
# sub main() {
if ($cancel != '') {
include '../Include/conf.inc';
header("Location: http://$WEB_SERV/$WEB_SITE" . "search.php3");
exit;
} elseif ($save != '') {
include '../Include/conf.inc';
$err_str = validate();
if ($err_str == '') {
add_log_entry($bcode);
$message = write_to_db($bcode);
#$A($message);
exit;
} else {
if (substr($err_str, -1, 1) != '!') {
$conflict_code = substr($err_str, -11, 10);
$err_str = $err_str . " <a
href='box_edit.php3?bcode=$conflict_code&db=yes&goto=" . urlencode($goto) .
"'>--></a>";
}
}
} else {
include '../Include/conf.inc';
$cd_qry = "select max(code) from equipment";
connecttodb();
$result = mysql_query($cd_qry);
LINE 162 $temp = mysql_fetch_row($result);
$bcode = $BCODE_START . str_pad((substr($temp[0], -6) +
1),6,'0',STR_PAD_LEFT);
}
include '../Include/ip_crd_tbl.inc';
include '../Include/show_list.inc';
#======================================================================