Hi,
for Instance i have 2 tables in MySql(Users,customers). I store the common data in the users table & some data in Customers table.First i insert data into the Users table. It generates an AutoIncrement value, I catch that value and store it in the customers tables. It works fine in my localhost
PhpMyAdmin ver2.9.2 ,
MySql 5.0.33 and the
php version 5.2.1.
Remote Server Details
MySql Version :- 4.0
Php Version :- 4.0
$i_rSet1= $g_db->Execute("select max(userid) from users ");
$maxuserid = $g_db->qstr($i_rSet1,get_magic_quotes_gpc());
$max = substr_replace(trim(substr($maxuserid,12)),"'",0,0);
"INSERT INTO customers(userid,user_name, cust_firstname, cust_lastname, cust_midname, cust_dis_val, cust_viewstock) VALUES($max,....................)";
prior to this code, i insert some data into the Users Table and in another file i catch the last inserted record Id and pass it to the above code.
This code works fine in my local database. when i upload my files and test at the remote server, its only inserting records into the users table and not performing the above operation.
Any reply/suggestion is welcome