MapTools.org

[Chameleon] SQL and Tables

Rene Teniere TENIERER@gov.ns.ca
Wed, 04 Feb 2004 08:58:38 -0400
Hi Sacha,

Just want to make sure I am about to do this right. I have my new
widget created (almost), and am about to implement the sqlquery and
table widget functionality. At the end of my wapquery class, would I
copy and paste the sqlquery class after it and hard-code all the values
like sqlquery, server, database... etc. and then do the same with the
table widget?

Rene

>>> Sacha Fournier <sfournier@dmsolutions.ca> 2004-02-02 9:36:36 AM
>>>
Hi,

Sure it can be done. There's many way to do this. First you can make 
your new widget inherit from Table widget and add a class member of
type 
SQLQuery widget and make sure to set all attributes of SQLQuery widget

based on the UID (Please note that current SQLQuery widget don't
support 
DBF yet). Your SQLQuery widget will put the result in a shared
resource. 
Make sure your shared resource is set to the same in both SQLQuery 
Widget and you new widget.

An other way, you can create a widget that inherit from the base widget

and add Table and SQLQuery widget as class member. This way, the user 
don't have any control on the way the table is displayed (hard coded in

you code).

It's basicly how to do it.

Rene Teniere wrote:
> Hi All,
> 
> Question: When using the SQL and Table widgets, can those be
embedded
> within the PHP code of a custom widget? Reason being that I am
creating
> a query widget that filters out data from a DBF and publishes the
> resultant data as a table for the user. The above widgets seem to be
the
> way to go, however, just wanting to know if this can all be done in
one
> shot through my new widget. I.E. enter the UID# and all the results
> should come up in table form automatically.
> 
> Thanks,
> 
> Rene
> 
> Rene J.R. Teniere - BSc., D.GIS
> GIS Technician
> Nova Scotia Department of Natural Resources
> Forestry Division (GIS) - Truro
> 
> Phone: (902) 893-5655
> Mobile: (902) 209-8956
> _______________________________________________
> Chameleon mailing list
> Chameleon@lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/chameleon 
> 


-- 
Sacha Fournier
Applications Developer
DM Solutions Group
tel: 418.696.5056
fax: 418.696.5056
http://www.dmsolutions.ca 
mailto://sfournier@dmsolutions.ca 
-- 
-------------------------------------------------
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format
  X   attachments.
/ \
-------------------------------------------------


This archive was generated by Pipermail.