Hi. At quick glance I think you have to free_result to free up the
memory at the end(?).
http://us2.php.net/manual/en/function.pg-free-result.php
/scott
Pierre Sahores wrote:
Le 21 sept. 04, à 21:28, [EMAIL PROTECTED] a écrit :
Pierre Sahores wrote:
Yes, it's a server side app directly speaking trought html forms on
the client side and binded to a rock solid SQL databases server on
the back-end. It works as a remplacement solution (and paradigm !)
to the less stuitable Java-based stuffs built to run on top of
Tomcat or JBoss servers.
Got the picture :)
To have an eye on what it does (whithout writting anything in this
real production state app, please !), you can test it on line in
both "filling datas mode" (login : 0931213N ; password: sais0093)
and "reporting mode" (login : synt0734 ; password: collecte) by
visiting <http://acacia93.dyndns.org/classpac.xml>.
Thanks Pierre had a good butchers (look) as they say over here. The
basic thing I want to be clear on is what would a function in php
look like that i can call from a php scrip to set a variable? Let's
take an example. Below is a php script for getting data from a mysql
database and setting some variables for use in a smarty template, the
key bit is not really the database stuff which is what we would
replace by calling Rev to act as middle ware, but the php function
that could be written to talk to the socket listening Rev app and get
the results back so as to set a variable in php (ie the
$smarty->assign("url",$url); bit). I am thinking that we could have
one generic php function that takes the name of a Rev based object to
call and maybe some params, passes the usual post day suitable
packaged, and then returns data (maybe as an array)?
Did you have a look to the PHP sockets listener/translator script I
provide along the example app you can get below ? It's possibly this
kind of stuff you are watching for. See the "wmc.xml" file (not xml at
all but a simple php script witch don't say its name to the
sad-side-of-the-force hackers...)
To get it, just type
<http://acacia93.dyndns.org/rev_web_app.zip> from
within your prefered Web browser.
Let me know if that helps.
Best, Pierre :-)
<?
/* PHP script, sends mysql result to a Smarty template
*/
require_once("Smarty.class.php");
$smarty = new Smarty;
// connect db
mysql_connect('localhost', 'test', 'test');
mysql_select_db('test');
$query = "select link, descr, DATE_FORMAT(date_added, '%e %M %Y') as
date, name from intranet_links";
// search for $s
if ($s)
$query .= " where (descr like '%$s%' or link like '%$s%')";
$result = mysql_query($query);
while ($data = mysql_fetch_array ($result)) {
$url[] .= $data[link];
$descr[] .= $data[descr];
$name[] .= $data[name];
$date[] .= $data[date];
}
$smarty->assign("url",$url);
$smarty->assign("descr",$descr);
$smarty->assign("name",$name);
$smarty->assign("date",$date);
$smarty->display("mysql.tpl");
// close db
mysql_close();
?>
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard