Re: Querying an SQL database
Re: Querying an SQL database
- Subject: Re: Querying an SQL database
- From: Timothy Bates <email@hidden>
- Date: Tue, 29 Apr 2003 19:04:26 +1000
>
Is their really no way to query an SQL database from AppleScript which,
>
lets face it, you can do "out of the box" in Perl, PHP and JavaScript?
>
I mean, I know there isn't a "SELECT" statement in AppleScript, but I
>
can't spend $250 connecting free stuff to free stuff. :-)
The only thing I can think of is to use php under the hood and do it via
curl or URL access.
So you would build a web page that accepts the parameters you need. Say
something like these 3 lines of code as an example
<? /*php example */
include('/myFunctions.inc'); //get your library of php helpers
$connection = connectToDataBase();
echo handleQuery($db, $connection, $query);
?>
Then call it like this
http://www.site.com/page.html?db=student&query="SELECT * FROM tests"
You will get back the results you want, and can take it from there.
You would add a bit of security of course.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.