This topic is locked

required files to use $sql

10/16/2010 7:11:29 AM
PHPRunner General questions
T
tedwilder author

hello

in my application, I send an email in an after event record ( add page ). I need the user to reply to this mail and says if agree or disagree with it ( basicly i send a pre-order mail and manager reply "agree" or disagree" so then the order is placed or not ).

Im gonna do a php script linked to a mail box : the script is lauch each time it receives a mail and parse the content and based on what it parses insert/update database record.

What i need to know is how can i use same"functions" as in an event page ? because this script is part of the phprunner application even though it's manually made.

BEcause my script will have to insert/update mysql records besides parsing i need to know what to " require" or "define" to use same language as in phprunner event page. ex: $sql="something.."

require "dbconnection.php"?
thank you.

T
tedwilder author 10/28/2010

here is my test file
<?php
//include("/var/www/CTI/fourniture2/test/include/phpfunctions.php");

//include("/var/www/CTI/fourniture2/test/include/locale.php");

include("/var/www/CTI/fourniture2/test/include/events.php");

//include("/var/www/CTI/fourniture2/test/include/commonfunctions.php");

//include("/var/www/CTI/fourniture2/test/include/dbconnection.php");

include("/var/www/CTI/fourniture2/test/include/dbcommon.php");

//include("/var/www/CTI/fourniture2/test/include/dbfunctions.php");

//include("/var/www/CTI/fourniture2/test/include/dal.php");

include("/var/www/CTI/fourniture2/test/include/appsettings.php");

include ("/var/www/CTI/fourniture2/test/include/param_settings.php");
$sql = "SELECT * FROM param WHERE ID =1";

$rs = CustomQuery($sql);

$dataparam = db_fetch_array($rs);
echo $dataparam["nomresponsable"];
?>
(I have table param )

It's not working. either it's saying function already declared, either it says $sql is already defined.. any idea?

J
Jane 11/4/2010

Unfortunately we do not support code written by our customers.

You can try to debug code manually and print all used variables in your code.