PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 11-27-2003, 08:02 PM   #1
Not Logged In
Green Mole
 
Not Logged In's Avatar
 
Join Date: Nov 2003
Posts: 5
Link to another table

I've been able to add a new field to 'sites', however I'm having problems linking to another table.

I added a field called account_id and when I enter a site for indexing I enter the ID of the account I already have.

What I want to do is pass more information to each result from my client DB. ex. sites.account_id = clients.id.

I've tried adding it to ' $query = "SELECT sites.site_url, sites.port, ' but to no avail.

I've also added my table to the config.php.

Any help would be great!

Thanks!
Not Logged In is offline   Reply With Quote
Old 11-28-2003, 03:54 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. The sites.account_id = clients.id portion would go in the WHERE portion of the query, and you'd need to add the table clients into the FROM portion of the query.

The query you are editing uses results from the previous query so you may want to edit that previous query instead and then just select sites.account_id in the query you are currently editing.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 11-28-2003, 08:35 AM   #3
Not Logged In
Green Mole
 
Not Logged In's Avatar
 
Join Date: Nov 2003
Posts: 5
Go it! I was not leaving a space after the last element in the 'WHERE'!

Stupid mistakes the hours it takes!

I have a site using "thinkding' works great!


Thanks for your help!

Robert
Not Logged In is offline   Reply With Quote
Old 11-28-2003, 09:49 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Have you integrated PhpDig with the ThinkDing script? My plans are to do something like this for a future release of PhpDig.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 11-28-2003, 10:30 AM   #5
Not Logged In
Green Mole
 
Not Logged In's Avatar
 
Join Date: Nov 2003
Posts: 5
I wish I knew how, willing to learn and help!
Not Logged In is offline   Reply With Quote
Reply

Thread Tools

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No link in temporary table yet again... funeral Troubleshooting 2 04-06-2005 01:45 PM
No link in temporary table raphael_ita Troubleshooting 4 12-07-2004 12:25 AM
No link in temporary table gooseman How-to Forum 4 05-14-2004 02:24 AM
No link in temporary table (yet another one) renehaentjens Troubleshooting 7 03-30-2004 10:46 PM
No link in temporary table michabis101 Troubleshooting 20 03-29-2004 01:08 PM


All times are GMT -8. The time now is 09:48 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.