Problem with MySQL view returning data
Posted: Sun Jan 30, 2011 12:57 am
I have finally got some time to allow me to getting round to testing Livecode. But I seem to have a problem. I have a simple view linking a number of tables.
I am using the following to get the data:
put vehicleBookingsLoadAll() into tRecord
set the dgText of group "dgVehicleBookings" to tRecord
and here is the function
function vehicleBookingsLoadAll
local rtnRecords, lclQuery
put "SELECT * FROM vehicleBookings " into lclQuery
put revDataFromQuery(tab,cr,gConnID,lclQuery) into rtnRecords
return rtnRecords
end vehicleBookingsLoadAll
this all works fine except its not returning all the data. I think its because when I look at rtnRecords
43 W1** *** TX1 Available 0
45 L*** Y*U TXII Available 0
47 A*** **P TXII Available 12 Marks Boddington 58977 34534 3453 33234545 2
49 **** T** Fairway Available 0
50 L*** U** TX4 Available 0
52 J*** F** Fairway Available 0
53 W*** U** TXI Available 0
54 L*** U** TXII Available 0
58 L*** L** TX4 Available 0
59 Y*** T** TXII Available 0
61 G*** T** Fairway Available 0
62 J*** F** Fairway Available 0
63 W5** *** TX1 Available 0
65 **02 *** TXII Available 0
70 L**5 *** TXII Available 0
44 **76 *** TX1 Workshop 0
46 **34 *** Fairway Workshop 14 Sidney Berkenslov 456546 456456
(** Blanked out some data)
it seems that the tabs are causing a problem. The data was created with different applications (I write this application over and over again in different programming languages when I'm trying or testing things out). There should be 30 rows returned. I tested the sql copied it from the value in lclQuery into MYSQL Admin and it returned 30 rows as it should.
I tested this in Realbasic, PHP,C# and Lazarus and all returned the data correctly but Livecode seems to have a problem. I am probably missing something obvious. I can't see it being a problem if Live code is the only application entering the data but I do see a problem if it has to play with other applications since its not reading the data correctly.
I am using the following to get the data:
put vehicleBookingsLoadAll() into tRecord
set the dgText of group "dgVehicleBookings" to tRecord
and here is the function
function vehicleBookingsLoadAll
local rtnRecords, lclQuery
put "SELECT * FROM vehicleBookings " into lclQuery
put revDataFromQuery(tab,cr,gConnID,lclQuery) into rtnRecords
return rtnRecords
end vehicleBookingsLoadAll
this all works fine except its not returning all the data. I think its because when I look at rtnRecords
43 W1** *** TX1 Available 0
45 L*** Y*U TXII Available 0
47 A*** **P TXII Available 12 Marks Boddington 58977 34534 3453 33234545 2
49 **** T** Fairway Available 0
50 L*** U** TX4 Available 0
52 J*** F** Fairway Available 0
53 W*** U** TXI Available 0
54 L*** U** TXII Available 0
58 L*** L** TX4 Available 0
59 Y*** T** TXII Available 0
61 G*** T** Fairway Available 0
62 J*** F** Fairway Available 0
63 W5** *** TX1 Available 0
65 **02 *** TXII Available 0
70 L**5 *** TXII Available 0
44 **76 *** TX1 Workshop 0
46 **34 *** Fairway Workshop 14 Sidney Berkenslov 456546 456456
(** Blanked out some data)
it seems that the tabs are causing a problem. The data was created with different applications (I write this application over and over again in different programming languages when I'm trying or testing things out). There should be 30 rows returned. I tested the sql copied it from the value in lclQuery into MYSQL Admin and it returned 30 rows as it should.
I tested this in Realbasic, PHP,C# and Lazarus and all returned the data correctly but Livecode seems to have a problem. I am probably missing something obvious. I can't see it being a problem if Live code is the only application entering the data but I do see a problem if it has to play with other applications since its not reading the data correctly.