Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th November 2007, 21:51
catdude catdude is offline
Senior Member
 
Join Date: Jun 2007
Posts: 178
Thanks: 1
Thanked 12 Times in 11 Posts
Default Extracting customers/domains from database

I've got ISPConfig running, serving just over 300 domains. One of the problems I have to deal with occasionally is that sometimes the customer name and the domain name aren't related. If I have to change some user settings for "midwestthingamajig.com" and have a customer entry named "Midwest Thingamajig Company" my task is easy. But if a customer named "Zaphod Beebblebrox" owns domain "starsearchersclub.net", I could be clicking client records for quite a while until I stumble across Herr Beebblebrox's entry.

What SQL query can I issue to display isp_isp_kunde.kunde_anrede, kunde_firma, kunde_name, etc given a domain name of "starsearchersclub.net"? Or as a more generalized question, I know how to print a list of domain names; how would I print a list of clients, with the domains configured for each? Or a list of the domains configured, with the client controlling each? Any or all of the those queries would be a huge help.

I'm still trying to come to terms with the way that everything is tied together through the various tables.
Reply With Quote
Sponsored Links
  #2  
Old 16th November 2007, 23:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,733
Thanks: 840
Thanked 5,596 Times in 4,407 Posts
Default

Normally all relationns e.g. between webs and email users are trogh the table isp_dep, but in case of clients and websites, the relation is a bit more complicated. I try to explain it here in "semi" sql sytax

We have to join the tables isp_kunde and isp_isp_kunde and isp_isp_web and the table isp_nodes:

isp_isp_web.doc_id = isp_node.doc_id
isp_isp_web.doctype_id = isp_node.doctype_id
isp_nodes.userid = isp_isp_kunde.webadmin_userid
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 16th November 2007, 23:45
catdude catdude is offline
Senior Member
 
Join Date: Jun 2007
Posts: 178
Thanks: 1
Thanked 12 Times in 11 Posts
 
Default

Quote:
Originally Posted by till
Normally all relationns e.g. between webs and email users are trogh the table isp_dep, but in case of clients and websites, the relation is a bit more complicated. I try to explain it here in "semi" sql sytax

We have to join the tables isp_kunde and isp_isp_kunde and isp_isp_web and the table isp_nodes:

isp_isp_web.doc_id = isp_node.doc_id
isp_isp_web.doctype_id = isp_node.doctype_id
isp_nodes.userid = isp_isp_kunde.webadmin_userid
Thanks! I'll give that a shot.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail System doesnt work! crichton Installation/Configuration 3 18th September 2007 00:49
Ability to Select Database Name / Username SleeperZ Tips/Tricks/Mods 17 19th April 2007 12:45
Custom database names and usernames kcackler Feature Requests 5 18th March 2007 21:59
ISPConfig and adding an SQL Database Texaskilt General 1 7th December 2006 10:52
Recreating ISPConfig database retran Installation/Configuration 2 16th April 2006 00:22


All times are GMT +2. The time now is 02:24.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.