Hello,

Would you be able to provide us some more custom queries?  Here's the story.

We are trying to build the interface to search for usernames.  Our usernames are in the form of email addresses.  Therefore we just use the Contact Email field in the customer summary screen as the place to store the accounts "username".  Our customers usernames are what they use to login to the internet with dialup or pppoe broadband.  The usersnames are stored on a completely different system and database.  We just keep CitrusDB upto date as best as we can manually.  (unless you know some magic to sync another database)

Ideas?

-Kreg

Paul Yasi wrote:
Any of these kinds of queries are possible, though you need to know
about SQL JOIN's to get them done.  Here are some examples:

To query a city with a specific service, you need to know the specific
service ID:

SELECT *
FROM customer
LEFT JOIN user_services ON user_services.account_number =
customer.account_number
WHERE customer.city LIKE '%Kansas City%'
AND user_services.master_service_id =3

If you wanted to query everyone with a service category you would join
the master_service table to the query:

SELECT *
FROM customer
LEFT JOIN user_services ON user_services.account_number =
customer.account_number
LEFT JOIN master_services ON master_services.id =
user_services.master_service_id
WHERE customer.city LIKE '%Kansas City%'
AND master_services.category = "dsl"

Paul

On 5/14/07, kreg <[EMAIL PROTECTED]> wrote:
  
All of our users in the database have a primary contact email address.

I am trying to get a list of all contact email addresses matching their City and certain added Services.

For example:
I would like a list of email addresses so that I can send an email to all customers who live in
Kansas City and have DSL service for an announcement.

-Kreg

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Citrusdb-users mailing list
Citrusdb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/citrusdb-users

    


  

--

Kreg Roenfeldt
Systems Administrator
----------------------------------------
p
208.548.2345
f 208.548.9911
e [EMAIL PROTECTED]
----------------------------------------
150 South Main
P.O. Box 270
Rockland, ID 83271-0270


Direct Communications

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Citrusdb-users mailing list
Citrusdb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/citrusdb-users

Reply via email to