miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

Using db_simpleSelect for complex query

 
Author Anonymous
Guest
#1 | Posted: 5 Oct 2006 05:46 
Trying to write custom PHP using the db_simpleSelect function, but I want to select from two tables and do a SQL join. When I try it, I get no results. I checked syntax by running the query straight from the DB. Does db_simpleSelect just not like having two tables passed in?

Author Anonymous
Guest
#2 | Posted: 5 Oct 2006 05:52 
P.S. Here is the syntax:

if($cols=db_simpleSelect(0,$Tt.' t, '.$Tp.' p','t.topic_id, t.topic_title, p.post_text','t.topic_id','=','p.topic_id','t.topic_id DESC',10))

Author Paul
Lead Developer 
#3 | Posted: 5 Oct 2006 10:02 
Function name says it all: db_simpleSelect, so it's not a place for executing heavy queries.

Heavy queries are actually not the thing we like in miniBB. They are used only when there is no other way; but in most cases, there is a way to create TWO simple selects instead of ONE, but this will be hundred times FASTER else if you use complex query. It will be definitely executed slowly on large systems and active forums!

Master Class miniBB Support Forums / Master Class /
 Using db_simpleSelect for complex query
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑