PDA

View Full Version : connect to mySql?


cepal
01-31-2004, 08:12 AM
Hi Antun

I just started to play around with Laszlo. is it possible to connect it to a mySql database and retrieve/update data with sql commands? Somewhere i read that there aren't any jdbc odbc connectors for Laszlo yet. If that is true how could Laszlo interface php or jsp methods which connect to a database? which methods would you use?

Gerald

inertia
01-31-2004, 04:29 PM
From what I can tell, an LZX has no way of connecting to a database directly. But why would you want to?

In order to feed data into an LZX, you need to create a server side script like an PHP or JSP (or anything) that no human looks at but instead is used to collect the data for the LZX to interpret.

There are details on how to do this in the tutorial that ships with LPS 2.0.

antun
02-02-2004, 08:39 AM
That's exactly right intertia - you'd write a server-side script in whatever language suited you. You can pass it GET (and POST, as of LPS 2.0) parameters from the Laszlo app. You would use a <dataset> as your interface in Laszlo to make the request, and capture the XML that your script returns.

Check out LZX Reference page for for <dataset> in the LPS download for a good example.

-Antun

raven
07-15-2004, 07:44 PM
I am looking for the example in the documentation, but I am not finding it.

Any ideas?

M@

d~l
07-21-2004, 06:14 AM
I've just reported success in getting Apache to integrate with Tomcat .. but this took some time to pin down ...

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=1021

I've also installed PHP and MySQL on the same Apache server, so one approach might be to experiment with some data exchanges between Apache (PHP / MySQL) and Tomcat (lzx applications).

My setup on personal server ..

Apache 2.0.4.0 on port 88
Tomcat 5.0.27 on port 8080
JK connector on port 8009

PHP 4.3.6
MySQL
PHPMyAdmin