i have a field in a table called refid which is varchar defined as NULL.
presently every time an insert query is executed i get the lastid and use this to update the refid field in such a way that this field records information like E1 E2 E3..... as per the code below.
---------------------------------------------------------------
$lastid = mysql_insert_id ();
UPDATE tablename SET refid = 'E$lastid' WHERE ref = '$lastid'
---------------------------------------------------------------
now what i need is instead of the refid starting from E1 E2 E3.... is it possible to chnage this to E101 E102 E103......
please provide the sql query in order to get this format.
also since i am presently doing a test with the table i dont mind dropping the table and recreating the table in order to get the above result.
please advice.
thanks.
presently every time an insert query is executed i get the lastid and use this to update the refid field in such a way that this field records information like E1 E2 E3..... as per the code below.
---------------------------------------------------------------
$lastid = mysql_insert_id ();
UPDATE tablename SET refid = 'E$lastid' WHERE ref = '$lastid'
---------------------------------------------------------------
now what i need is instead of the refid starting from E1 E2 E3.... is it possible to chnage this to E101 E102 E103......
please provide the sql query in order to get this format.
also since i am presently doing a test with the table i dont mind dropping the table and recreating the table in order to get the above result.
please advice.
thanks.
Comment