Jump to content


Photo

Help!


  • Please log in to reply
No replies to this topic

#1 takeiteasy

takeiteasy
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 May 2006 - 06:39 AM

I'm urgent for help here! can anyone help me with the codes?
Right now, i 'm doing the archive page of my project
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());

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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users