I have a table (car) that has a primary key composed of two fields (track_id,car_id). When I issue the following command from within Powerbuilder (4 GL client tool similar to VB)
declare
integer car_no,track_no
car_no = 123
track_no = 1
Select * from car
where car_id = :car_no and track_id = :track_no;
This returns no rows. If I drop the primry key on the table it will return the correct number of rows. Also if I issue the select as
Select * from car
where car_id = 123 and track_id = 1;
it will return the correct number of rows.
MYSQL is version 3.23.53a and the ODBC driver is 3.51
Does anyone know why the select using the variables will not work?
declare
integer car_no,track_no
car_no = 123
track_no = 1
Select * from car
where car_id = :car_no and track_id = :track_no;
This returns no rows. If I drop the primry key on the table it will return the correct number of rows. Also if I issue the select as
Select * from car
where car_id = 123 and track_id = 1;
it will return the correct number of rows.
MYSQL is version 3.23.53a and the ODBC driver is 3.51
Does anyone know why the select using the variables will not work?