EzOracle extensions Query no execute???

Author Message

Amer Azzaz

Thursday 19 January 2006 12:18:27 am

Hi to all
I write the function in my Class but in this function I want to connect Oracle via ezoracle extension and execute query but this query is concatenate with multiple variable like that:
function DisplayDataRegional($CountryId, $StateId, $Industryid, $brandId)
{
$result = array('ls' => Array());

$databaseParameters=array('server'=>'Dbox','user'=>'tatis','password'=>'tatis','database'=>'EPSA.CMS');

$conn =& eZDB::instance( 'ezoracle', $databaseParameters,true);
if (!$conn) {
$result['ls'] = "Cannot Login";
return $result;
}
$x="Canada";
$query ='Select * FROM V_CONTACT_WEB WHERE CNTNAME=(select COUNTRYNAME from COUNTRY Where COUNTRYID='."$CountryId".')
AND
ADD_STATE=(select STATENAME from STATEID Where STATEID='."$StateId".')
AND
IDNWEB_CUSTOMER in( SELECT IDNWEB_CUSTOMER FROM NWEB_INDUSTRY_NWEB_CUSTOMER
WHERE IDNWEB_INDUSTRY='."$Industryid".')
AND
IDNWEB_CUSTOMER in( SELECT IDNWEB_CUSTOMER FROM NWEB_BRAND_NWEB_CUSTOMER
WHERE IDNWEB_BRAND='."$brandId".')';
$stid =$conn->arrayQuery( $query );
if (!$stid) {
$result['ls'] = "Cannot execute";
return $result;
}

$counter=$counter1=0;

foreach ( $stid as $row )
{
$counter1 = 0;
foreach ($row as $item)
{
$result['ls'][$counter][$counter1]=$item;
$counter1++;
}
$counter++;
}

return Array ('result' => $result);
}
Error: eZOracleDB Jan 19 2006 10:16:23
Error (936): ORA-00936: missing expression

If I change the query like the query execute and The data retreived from DB.
Thank you

Frederik Holljen

Thursday 19 January 2006 12:26:36 am

I think you stand a better chance to get a good answer if you also include the result of your method (e.g the offending query). Even better would be if you made a smaller reproduceable case out of the query.

Amer Azzaz

Thursday 19 January 2006 1:04:39 am

Ok ok The query executed but no data in page
Thank you

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 15:55:50
Script start
Timing: Jan 18 2025 15:55:50
Module start 'layout'
Timing: Jan 18 2025 15:55:50
Module start 'content'
Timing: Jan 18 2025 15:55:50
Module end 'content'
Timing: Jan 18 2025 15:55:50
Script end

Main resources:

Total runtime0.7554 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.9141152.6250
Module start 'layout' 0.00720.0033 740.539139.4609
Module start 'content' 0.01050.7434 780.0000511.8672
Module end 'content' 0.75390.0014 1,291.867212.1563
Script end 0.7553  1,304.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4620160.0002
Check MTime0.00150.2025160.0001
Mysql Total
Database connection0.00100.136210.0010
Mysqli_queries0.700892.7715570.0123
Looping result0.00050.0716550.0000
Template Total0.717094.920.3585
Template load0.00240.321420.0012
Template processing0.714694.602020.3573
Template load and register function0.00020.023510.0002
states
state_id_array0.00200.264810.0020
state_identifier_array0.00090.123420.0005
Override
Cache load0.00190.2519570.0000
Sytem overhead
Fetch class attribute can translate value0.00070.087620.0003
Fetch class attribute name0.00170.219640.0004
XML
Image XML parsing0.00060.085120.0003
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00320.4252160.0002
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs