Page 1 of 1

mysql command dont retrive data

Posted: Thu Jan 23, 2014 10:13 pm
by totalnoob
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

Re: mysql command dont retrive data

Posted: Fri Jan 24, 2014 11:40 am
by splash21
Hi - what results did you get before and what do you get now? What ends up in the tResult variable?

:?:

Re: mysql command dont retrive data

Posted: Fri Jan 24, 2014 1:48 pm
by totalnoob
sorry for your time its working now