Query an external Database

Author Message

Nayef Abu Ebaid

Monday 18 December 2006 6:28:09 am

Hi Everyone,

I have a toolbar that i use to as an advertising template, every section on the site has its own ad, so every ad has zone i, i use the template to tell the toolbar in which section i am and it will get the ads for me, i have a database that has all the zone ids in it, i want the toolbar somehow to query the database and get the zone id depned on the section, so I was thinking of writing a query using php to query this db. how can do that?!

Nayef

kracker (the)

Monday 18 December 2006 10:01:45 am

Yes. Use the 'wrap_operator' it will work perfectly for your needs.

<i>http://ez.no/community/forum/setup_design/include_website_in_another#msg115898</i>

//kracker
<i>tv : reading rainbow ...</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Xavier Dutoit

Monday 18 December 2006 4:46:35 pm

and beware the various caches so you have your toolbar recalculated for each different sections instead of reusing one from a previously cached one.

X+

http://www.sydesy.com

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 22:21:35
Script start
Timing: Jan 18 2025 22:21:35
Module start 'layout'
Timing: Jan 18 2025 22:21:35
Module start 'content'
Timing: Jan 18 2025 22:21:35
Module end 'content'
Timing: Jan 18 2025 22:21:35
Script end

Main resources:

Total runtime0.0267 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.3359152.6250
Module start 'layout' 0.00670.0042 741.960939.4453
Module start 'content' 0.01090.0136 781.406389.2891
Module end 'content' 0.02440.0023 870.695334.3047
Script end 0.0267  905.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002810.5765140.0002
Check MTime0.00124.4352140.0001
Mysql Total
Database connection0.00103.591510.0010
Mysqli_queries0.003512.916730.0012
Looping result0.00000.064210.0000
Template Total0.00176.310.0017
Template load0.00093.531710.0009
Template processing0.00072.715710.0007
Override
Cache load0.00062.375010.0006
General
dbfile0.00031.031980.0000
String conversion0.00000.033040.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