Hi all,
Been pulling my hair out with this all day and would really appriciate a little help
I Have this selection box in one of the forms on my page:
{type: "select", name:"addAreaSel",label: "Add area preference",
connector:"resources/lib/cons/mySettings/prefrences_selectConnect.php"},
and I ve been trying to auto populate it with data from a db as per the tutorial here:
http://docs.dhtmlx.com/doku.php?id=dhtmlxconnector:selectoptionsconnector
but whenever I do I get :
[b]
( ! ) Strict standards: Only variables should be assigned by reference in C:\wamp\www\codebase\connector\base_connector.php on line 62 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0025 | 373232 | {main}( ) | ..\areaPrefrences_selectConnect.php:0 |
2 | 0.0400 | 1052600 | Connector->render_table( ) | ..\prefrences_selectConnect.php:30 |
3 | 0.0402 | 1053616 | Connector->render( ) | ..\base_connector.php:279 |
4 | 0.0402 | 1054048 | SortInterface->__construct( ) | ..\base_connector.php:328 |
( ! ) Strict standards: Only variables should be assigned by reference in C:\wamp\www\codebase\connector\base_connector.php on line 85 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0025 | 373232 | {main}( ) | ..\prefrences_selectConnect.php:0 |
2 | 0.0400 | 1052600 | Connector->render_table( ) | ..\prefrences_selectConnect.php:30 |
3 | 0.0402 | 1053616 | Connector->render( ) | ..\base_connector.php:279 |
4 | 0.0406 | 1054168 | FilterInterface->__construct( ) | ..\base_connector.php:329 |
( ! ) Fatal error: Call to undefined method OptionsDataItem::xmlentities() in C:\wamp\www\codebase\connector\options_connector.php on line 17 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0025 | 373232 | {main}( ) | ..\prefrences_selectConnect.php:0 |
2 | 0.0400 | 1052600 | Connector->render_table( ) | ..\prefrences_selectConnect.php:30 |
3 | 0.0402 | 1053616 | Connector->render( ) | ..\base_connector.php:279 |
4 | 0.0427 | 1055808 | Connector->output_as_xml( ) | ..\base_connector.php:330 |
5 | 0.0427 | 1055808 | Connector->render_set( ) | ..\base_connector.php:412 |
6 | 0.0428 | 1056624 | OptionsDataItem->to_xml( ) | ..\base_connector.php:401 |
[/b]
Now from the research I’ve done I dont think this is strictly (excuse the pun ) an error its actually PHP warning me that it does’nt recommend passing results from object methods by reference in the base connector class.
Im using PHP 5.3.5 and I’v tried configuring the .ini in every which way I can think of but nothing seems to work, and its stopping my selection boxes from functioning.
for references heres my php connection class:
$conn = mysql_connect($host, $userName, $pwd);
mysql_select_db($dbName);
// create a new selections connector object and pass it the DB connection
$areaSelectData = new SelectOptionsConnector($conn, "MySQL");
$areaSelectData->enable_log("log.txt");
// populate the selection box with data from the transport type look-up table using transport type id as
// value and description as the lable
$areaSelectData->render_table("pCode", "Area_Code", " Area_Code, Area_Name");
and heres the log:
SELECT `Area_Code`,`Area_Code`,`Area_Name` FROM pCode
Which looks a little odd to me as it seems to be selecting the same field twice .
Sorry about the long windedness but can anyone help please ??