Subject: | bad insert id being returned |
Here is stuff about my environment:
for perl version This is perl, v5.8.4 built for i386-freebsd
Net::MySQL
FreeBSD 4.7-RELEASE-p28 FreeBSD 4.7-RELEASE-p28 #40: Fri Mar 11 14:16:49 MST 2005 root@fc2:/usr/src/sys/compile/VKERN i386
The problem is that i call the package Net::MySQL to insert some rows into a database. When i call the method, get_insert_id()
it returns the correct id, until i get to id 65536 (2^8)
Here is the code sample:
if ($mysql->is_error){
#get error message
$toBeReturned="ERROR:".$mysql->get_error_message;
open(FILE, ">>$LOG_FILE") || die("n$LOG_FILE: $!nn");
#Print to the file the name and email to the file
print FILE "ERROR Customer Insert sql:$insertSQL\n";
close(FILE);
}
else{
$toBeReturned=$mysql->get_insert_id;
}
$toBeReturned equals 253 for every customer after I have passed the id 65535.
Please help me resolve this problem.
Thanks,