Stroed Procedures and MS Sql Server 2000

Author Message

Adam Butler

Tuesday 19 May 2009 6:23:16 am

Hi I have the following code in a template doing a simple query via ezcDb api

$query ='SELECT LOCATION_NAME as name,
LOCATION_ID as id FROM LOCATION WHERE LOCATION_TYPE_ID = 2
AND PARENT_LOCATION_ID = '.$country_id;

$confObject = databaseconfig::getInstance();
$dbconfig = $confObject->getConfig();
$db = ezcDbFactory::create($dbconfig);
ezcDbInstance::set( $db );
$db = ezcDbInstance::get();
$rows = $db->query($query) ;
return $rows->fetchAll();;

However I would like to convert this from the quesry above to calling a stored proceedure but can't find anything in the documentation for how to call a stroed procedure.

Can any one help

Thanks

André R.

Tuesday 19 May 2009 6:49:43 am

You'll probably get more response if you post to the ezc mailing list.
As far as I know, ezc DB does not have any specific support for stored procedures yet.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Adam Butler

Tuesday 19 May 2009 6:57:13 am

Thanks Andre will do

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 30 2025 19:34:27
Script start
Timing: Jan 30 2025 19:34:27
Module start 'layout'
Timing: Jan 30 2025 19:34:27
Module start 'content'
Timing: Jan 30 2025 19:34:27
Module end 'content'
Timing: Jan 30 2025 19:34:27
Script end

Main resources:

Total runtime0.0216 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 588.2656151.2266
Module start 'layout' 0.00450.0036 739.4922220.7188
Module start 'content' 0.00820.0119 960.2109997.8359
Module end 'content' 0.02010.0015 1,958.046933.9922
Script end 0.0216  1,992.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002511.7378140.0002
Check MTime0.00114.8776140.0001
Mysql Total
Database connection0.00073.258010.0007
Mysqli_queries0.002411.127730.0008
Looping result0.00000.065110.0000
Template Total0.00115.010.0011
Template load0.00094.146110.0009
Template processing0.00020.837410.0002
Override
Cache load0.00062.994310.0006
General
dbfile0.00114.915180.0001
String conversion0.00000.030940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs