Anyways, I have copied and slightly modified code from the "Exploring Revolution: Work with Databases" tutorial to connect to a MySQL database, and I'm not having much success.
Code: Select all
local sDatabaseId
on preOpenStack
databaseConnect
-- Show the first available record:
goNext 0
if the result is not empty then
uiReset
end if
end preOpenStack
on databaseConnect
get revOpenDatabase("mysql", "(RunRev website)", "test", "example", "example")
if it is not an integer then
error "Could not connect to database:" && it
end if
put it into sDatabaseId
end databaseConnect
If I understand it correctly, goNext will go to the next record. But since I have not defined which table to look in, how does it know where to look for the next record, or am I looking at the problem all wrong?