This topic is locked

How to Append ID

1/24/2008 6:40:54 AM
PHPRunner General questions
L
Lisa2006 author


[font=Arial]global $conn;

$sql = "update removal_posting set posting_booking_ordernumber=ID where ID=".$keys["ID"];

db_exec($sql,$conn);

[font=Arial]i.e. Oringal ID = 25

Amended posting_booking_ordernumber = R25
[font="Arial"]global $conn;

$sql = "update removal_posting set posting_booking_ordernumber=ID where ID=".$keys["ID"];

;

echo $values["posting_booking_ordernumber"];[/b]

db_exec($sql,$conn);
[font=Arial]Your help would be much appreciated.
Lisa

J
Jane 1/24/2008

Lisa,
try to use this code:

global $conn;

$values["posting_booking_ordernumber"]= 'R'.$values["posting_booking_ordernumber"];

echo $values["posting_booking_ordernumber"];

$sql = "update removal_posting set posting_booking_ordernumber='".$values["posting_booking_ordernumber"]."' where ID=".$keys["ID"];

db_exec($sql,$conn);

L
Lisa2006 author 1/24/2008

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=25164&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' /> Happy Bunny,
Thanks Jane !!!
Lisa