Jump to content


Questions about querries?


4 replies to this topic

#1 BudmannG

  • Members
  • 14 posts
  • Location:USA
  • Illinois

Posted 28 February 2007 - 09:56 PM

Hi Visible,
I was wanting to know how many data base qurries I can put in one block? Say I want to pull from the ibf_topics and ibf_forums. Is this possible to do without error?

Thanks, Bud
Thanks, Bud!
Midwest Illinois DSM.com

I'll try to be nicer, If you try to be smarter!

#2 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 01 March 2007 - 10:18 AM

BudmannG said:

Hi Visible,
I was wanting to know how many data base qurries I can put in one block? Say I want to pull from the ibf_topics and ibf_forums. Is this possible to do without error?

Thanks, Bud
Not sure what you mean exactly. You can put as many queries as you like in a MKPortal block. But what you want to do would only take one query..

SELECT t.table1, t.table2, f.table1, f.table2 FROM ibf_topics AS t, ibf_forums AS f



Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard

#3 BudmannG

  • Members
  • 14 posts
  • Location:USA
  • Illinois

Posted 01 March 2007 - 10:25 AM

Thank you, I will give that a go.
Thanks, Bud!
Midwest Illinois DSM.com

I'll try to be nicer, If you try to be smarter!

#4 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 01 March 2007 - 10:31 AM

Keep in mind that usually you will want to pull related data from both tables by comparing IDs...

SELECT t.table1, t.table2, f.table1, f.table2 FROM ibf_topics AS t, ibf_forums AS f
WHERE t.id=f.id
and sometimes you will need to use a JOIN statement to pull the data.


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard

#5 BudmannG

  • Members
  • 14 posts
  • Location:USA
  • Illinois

Posted 01 March 2007 - 01:36 PM

I added the forum names to the "ipb21_lposts_table_21". I didn't have to modify it much, I just added f.name to the querry and it works great.
The one I am having major trouble with is the last post icon. Still haven't figured that one out yet.
I will get a screen shot up ASAP!

Posted Image
Thanks, Bud!
Midwest Illinois DSM.com

I'll try to be nicer, If you try to be smarter!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users