"like" query to ezpersistentobject...

Author Message

Jerry Jalava

Tuesday 05 August 2003 9:39:49 am

I think it would be nice if you could implement an like query possibility to ezpersistentobect also...

I had to do it like this so I could get the right kind of array sended to the template:
------
$asObject = true;
$sqlText = "SELECT * FROM test_table WHERE TestCell LIKE '%$Search%'";
$rows =& $db->arrayQuery( $sqlText,
$db_params );

return eZPersistentObject::handleRows( $rows, $class_name, $asObject );
------

Regards,
Jerry

Selmah Maxim

Sunday 10 August 2003 9:42:43 am

Hi Jerry ..

I think you can do it, else how the search goes ?

Btw .. I found how to make multi query and fetch specific rows with specific terms... I didn`t tho its can be done with this way, but its work ... Today I had finished really complex module for admin .. I hope this the last module :)

Jerry Jalava

Monday 11 August 2003 3:12:17 am

Hi Selmah,

Actually if you check the ezsearch module, it doesn't use ezpersistent object for fetcing the data. Actually it uses almoust the same way that I had to use...

Could you tell a bit more about that multiquery? Example maybe...

Thanks,
Jerry

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

Main resources:

Total runtime0.6142 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.0045 587.9219152.6250
Module start 'layout' 0.00450.0028 740.546939.4609
Module start 'content' 0.00740.6055 780.0078470.4688
Module end 'content' 0.61290.0013 1,250.47668.1563
Script end 0.6142  1,258.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5619160.0002
Check MTime0.00140.2351160.0001
Mysql Total
Database connection0.00060.102110.0006
Mysqli_queries0.567992.4689570.0100
Looping result0.00060.0928550.0000
Template Total0.574993.620.2875
Template load0.00270.434120.0013
Template processing0.572293.171020.2861
Template load and register function0.00010.021810.0001
states
state_id_array0.00100.168210.0010
state_identifier_array0.00090.140420.0004
Override
Cache load0.00220.3635240.0001
Sytem overhead
Fetch class attribute can translate value0.00060.101620.0003
Fetch class attribute name0.00090.151930.0003
XML
Image XML parsing0.00020.035920.0001
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00070.1155100.0001
String conversion0.00000.001140.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
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs