mysql command dont retrive data

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
totalnoob
Posts: 20
Joined: Tue Jul 02, 2013 10:40 am

mysql command dont retrive data

Post by totalnoob » Thu Jan 23, 2014 10:13 pm

Hello guys
Im making little app just for fun about choosing movie by selecting genre actors ...
my code looks like

Code: Select all

on mouseUp
    
    global gConnectionID
    
    
    put "johnny.heliohost.org" into tDatabaseAddress
    put "s" into tDatabaseName
    put "name" into tDatabaseUser
    put "pass" into tDatabasePassword
    
    -- connect to the database
    put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult
    
  
    if tResult is a number then
        put tResult into gConnectionID
        answer info "Connected to the database." & cr & "Connection ID = " & gConnectionID
    else
        put empty into gConnectionID
        answer error "Unable to connect to the database:" & cr & tResult
     end if
      
      
      
global gConnectionID
put field "genre" into theSearchString
put field "year" into theSearchString2
put field "actors" into theSearchString3

get revDataFromQuery(tab, return, gConnectionID, "SELECT * FROM movies WHERE Genre LIKE '%" & theSearchString & "%' AND Year "& theSearchString2 &" AND Actors LIKE '%" & theSearchString3 &"  % '"  )
set the dgText of group "datagrid 1" to it


end mouseUp
connect to database is working but it dont show anything few months ago it was working i dont know why it dont showing results
thanks

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Contact:

Re: mysql command dont retrive data

Post by splash21 » Fri Jan 24, 2014 11:40 am

Hi - what results did you get before and what do you get now? What ends up in the tResult variable?

:?:
LiveCode Development & Training : http://splash21.com

totalnoob
Posts: 20
Joined: Tue Jul 02, 2013 10:40 am

Re: mysql command dont retrive data

Post by totalnoob » Fri Jan 24, 2014 1:48 pm

sorry for your time its working now

Post Reply