Jump to content

Archived

This topic is now archived and is closed to further replies.

takeiteasy

Help!

Recommended Posts

I'm urgent for help here! can anyone help me with the codes?
Right now, i 'm doing the archive page of my project
[code]
if (isset($HTTP_GET_VARS['empRef']))
{
$result = mysql_query("INSERT INTO archive (empRef, empName, workerName, flightNo, airCompany, ticketType, destination, time, DOD, DOR, receiptNo, quotes, amtpaid, paymentMode, chequeNo, AD,agentQuote, payAgent, remarks)
                                      SELECT empRef, empName, workerName, flightNo, airCompany, ticketType, destination, time, DOD, DOR, receiptNo, quotes, amtpaid, paymentMode, chequeNo, AD,agentQuote, payAgent, remarks
                                      FROM airticketbooking
                                      WHERE empRef='$HTTP_GET_VARS[empRef]'",$db_connection) or die(mysql_error());
[/code]

but i have 1 more condition before i want to Insert data into the database, that is to check if there's a same empRef with $HTTP_GET_VARS['empRef'] in the archive table so how do i write the codes?

And also after Inserting the data in the archive table, i wan to delete the data in the airticketbooking table, how do i write out the code?
TIA!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.