Jump to content

[SOLVED] Small sql help...


Gnub

Recommended Posts

Im a little reluctant on posting sql problems on here, because they are small, but when im in a little bit of a deadline, a quick solution is better :)

 

Ok, i've pretty much copied the SQL from one query to another, changing where needed.  Now, im getting a...

 

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Passenger, Mobile Number, NoAdults, NoChild, NoInfant, HotelName"

 

I've added a few lines before, incase it's something from there, but i've not got any problems with that part, as it's doing what's needed.

 

Mobile Number, No Adults, No Child, and No Infant are as INT types on the DB.

 

SQL Query:

if($sent) 
{print "Your mail was sent successfully"; }
else 
{print "We encountered an error sending your mail"; }

$sql = "INSERT INTO `Majorca_Transfers` (BookingRef, Lead Passenger, Mobile Number, NoAdults, NoChild, NoInfant, HotelName, Resort, ShuttleArea, DepDate, FromAPT, ToAPT, FltNumber, ArrivalTime, DepDateFrom, FromAPTF, ToAPTF, FltNumberT, DepartureTime) VALUES ('$OurRef', '$Lead', $Mobile, $Adult, $Child, $Infant, '$Hotel', '$Resort', '$Area', '$DateFrom', '$FromAPT1', '$ToAPT1', '$FLTN1', '$ARRTIME1', '$DateFrom', '$FromAPT2', '$ToAPT2', '$FLTN2', '$ARRTIME2')";
$sql2 = "Select * From `Majorca_Transfers` Where `BookingRef` = $OurRef";

 

Thanks in advance for pointing out my error.

 

Gnub.

Link to comment
https://forums.phpfreaks.com/topic/49079-solved-small-sql-help/
Share on other sites

Archived

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

×
×
  • Create New...

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.