How to do this query in class definition() MultiSelect' ?!

Author Message

Selmah Maxim

Monday 04 August 2003 6:49:01 am

select
ezcontentobject.id , ezcontentobject.owner_id, ezcontentobject.current_version
from ezcontentobject
where
ezcontentobject.contentclass_id = '15' and
ezcontentobject.owner_id = '$userID' and
ezcontentobject.status = '1'
order by ezcontentobject.id limit 1

Jerry Jalava

Monday 04 August 2003 8:13:33 pm

If I understood you right, then here might be what you are looking for:

[code]
$db =& eZDB::instance();

$asObject = true;

$sqlText = "SELECT ezcontentobject.id, ezcontentobject.owner_id, ezcontentobject.current_version FROM ezcontentobject WHERE ezcontentobject.contentclass_id = '15' and ezcontentobject.owner_id = '$userID' and ezcontentobject.status = '1' ORDER BY ezcontentobject.id limit 1";
$rows =& $db->arrayQuery( $sqlText );

return eZPersistentObject::handleRows( $rows, $class_name, $asObject );
[/code]

Hope this help,
Jerry

Selmah Maxim

Tuesday 05 August 2003 1:02:05 am

yes ... I think so ... but I didn`t see query like this for definition function in all ezp classes !

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 18:31:03
Script start
Timing: Jan 18 2025 18:31:03
Module start 'layout'
Timing: Jan 18 2025 18:31:03
Module start 'content'
Timing: Jan 18 2025 18:31:04
Module end 'content'
Timing: Jan 18 2025 18:31:04
Script end

Main resources:

Total runtime1.0993 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.0054 588.0625152.6406
Module start 'layout' 0.00540.0037 740.703139.4766
Module start 'content' 0.00911.0886 780.1797471.7734
Module end 'content' 1.09770.0014 1,251.95318.4219
Script end 1.0992  1,260.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2860160.0002
Check MTime0.00130.1189160.0001
Mysql Total
Database connection0.00120.111810.0012
Mysqli_queries1.054795.9465570.0185
Looping result0.00050.0486550.0000
Template Total1.068397.220.5342
Template load0.00190.176720.0010
Template processing1.066497.008720.5332
Template load and register function0.00010.011610.0001
states
state_id_array0.00090.085210.0009
state_identifier_array0.00120.109120.0006
Override
Cache load0.00160.1412240.0001
Sytem overhead
Fetch class attribute can translate value0.00060.051220.0003
Fetch class attribute name0.00130.122430.0004
XML
Image XML parsing0.00030.024220.0001
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00060.0579100.0001
String conversion0.00000.000740.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
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs