Hi all,
Linux Ver: 2.6.18-128.el5
MySQL Ver: 5.0.45-7.el5
PHP Ver: 6.0.4-20090625.11
I am taking my first steps into "Stored Procedures" and have come across a problem when calling the procedure.
Firstly the script for my procedure:
DELIMITER //
CREATE PROCEDURE flightdata(IN AD VARCHAR(1), Term VARCHAR(1))
BEGIN
SELECT ArriveDepart, DayNumber, CodeShare, ScheduledDateTime, ScheduledTime, Flight, Logo, IATALookup, RemarksWithTime,Terminal, Gate
FROM LHRFS24
WHERE ArriveDepart = AD AND Terminal = Term
ORDER BY DayNumber DESC,ScheduledTime ASC, IATALookup ASC;
END //
DELIMITER ;
If I then run "Call flightdata(I,1);" from the command line I get the floowing error:
ERROR 1054 (42S22): Unknown column 'I' in 'field list'
In the table there is a field called "ArriveDepart" and a Feild called "Terminal", ArriveDepart contains "I" (Inbound) and Field "Terminal" contains "1" (one).
On reading documentation on using a procedure from PHP the code would be:
call flightdata(I,1); and this should return all data that has the "ArriveDepart" filed containing "I" and the Terminal field containing "1".
Or al I doing this completely wrong?