I need capture time from server mysql using command NOW(); and assign to variable global y possible?
Thank's
Capture time from server mysql and assign to variable
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 5
- Joined: Wed Dec 13, 2006 8:10 am
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: Capture time from server mysql and assign to variable
Assuming you've already connected to the database using the revOpenDatabase function, it's as easy as using the revDataFromQuery function to call into the remote function:
If the database is not on the same local network, I urge you to move this logic to a CGI script on the server, as it is not recommended to allow world-wide direct access to your MySQL database. Instead, you should always go through an 'application' layer.
Jan Schenkel.
Code: Select all
on mouseUp
global gDatabaseId -- return value from revOpenDatabase
answer revDataFromQuery(comma, return, gDatabaseId, "SELECT NOW()")
end mouseUp
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com