FeedForAll Forum Index ?
?Home?????FAQ????? Search ?????Memberlist ?????Register ?????Profile? ????Log in
?Multiple SQL Selects View next topic
View previous topic
Post new topicReply to topic
Author Message
phpdev



Joined: 12 Oct 2005
Posts: 42

PostPosted: Wed Nov 01, 2006 7:03 pm Reply with quoteBack to top

It would be nice if you could define multiple sql selects and call the sql you wihs to run in your script call.

IE: In the config define- SQL_1="Select name from table a...."
SQL_2="Select number from table b"

Then call the script and pass the sql you want executed like:
........&sql_exec=SQL_1

Make sense? Any plans?
View user's profileSend private message
MacSupport



Joined: 24 Feb 2005
Posts: 1569

PostPosted: Wed Nov 01, 2006 7:11 pm Reply with quoteBack to top

phpdev wrote:
It would be nice if you could define multiple sql selects and call the sql you wihs to run in your script call.

IE: In the config define- SQL_1="Select name from table a...."
SQL_2="Select number from table b"

Then call the script and pass the sql you want executed like:
........&sql_exec=SQL_1

Make sense? Any plans?


No it doesn't make sense. Can you give an exact example and reasons why using JOIN or UNION won't work.

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
View user's profileSend private messageVisit poster's website
phpdev



Joined: 12 Oct 2005
Posts: 42

PostPosted: Mon Nov 20, 2006 6:07 pm Reply with quoteBack to top

Because not all tables are relational for one. Two, what if you are running multiple databses, and want a feed from each? That help?
View user's profileSend private message
MacSupport



Joined: 24 Feb 2005
Posts: 1569

PostPosted: Mon Nov 20, 2006 6:59 pm Reply with quoteBack to top

phpdev wrote:
Because not all tables are relational for one. Two, what if you are running multiple databses, and want a feed from each? That help?


If the two tables are not relational how do you properly use the items from the different tables so they match up properly?

As far as multiple databases, you could create a feed from each and then merge them using rssMesh.php

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
View user's profileSend private messageVisit poster's website
phpdev



Joined: 12 Oct 2005
Posts: 42

PostPosted: Thu Nov 23, 2006 4:40 am Reply with quoteBack to top

Thanks Jim for the reply. I guess what I was thinking is, let's say you want to pull data for:

- Total number of users on your site
- Total number of X on your site (x being something else)

Assuming the data is in 2 different tables, and the tables are not relational in the databse they are stored or the tables are in different databases, I just see value in being able to define multiple selects and telling the script which one to run, so the feed will display only the data you want from the config file where they would be kept.
View user's profileSend private message
Display posts from previous:?? ? ?
Post new topicReply to topic


?Jump to:? ?



View next topic
View previous topic


Powered by phpBB ? 2001, 2002 phpBB Group :: FI Theme