miniBB Support Forums
|
Forums
|
Register
|
Reply
|
Search
|
Statistics
|
Manual
|
miniBB Support Forums
/
Master Class
/
Using db_simpleSelect for complex query
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?
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))
Paul
CEO
#3
|
Posted: 5 Oct 2006 10:02
Function name says it all: db_
simple
Select, 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!
miniBB Support Forums
/
Master Class
/ Using db_simpleSelect for complex query
↑
Top
Your Reply
Short link for this topic:
?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.
Before posting, make sure your message is compliant with our
forum posting rules
. If not, it may be locked or deleted with no explanation.
News & Announcements
FAQ
How To
Bugs
The Other
Official Addons and Solutions
Custom Tutorials and Modifications
Master Class
Specific
Re-cycled
Suggestions
Testimonials
qwerty
Features
Requirements
Demo
Download
Showcase
Gallery of Arts
Compiler
Premium Extensions
Premium Support
License
Contacts
Allow your miniBB-forums members communicate with each other
with the
Private Messaging add-on
!