The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Diffrence between query_read and query_write?
Hello,
I want to know the diffrence between "query_read" and "query_write" commands?? I know i should use "query_read" for ("SELECT","SHOW") and "query_write" for ("INSERT","UPDATE","DELETE","REPLACE",... etc) But when i revised the file "class_core.php" i found: PHP Code:
PHP Code:
The same thing !! what's the diffrence between them ? and can i use "query_read" for write queries and "query_write" for read queries? |
#2
|
||||
|
||||
At the moment, there is no difference - there may be in the future, but there isn't any now. (Heck, you can have a look ay query() is you want to...)
You should use query_write() when writing data and query_read() when reading data. |
#3
|
||||
|
||||
Unless timing is vital, you should use query_read_slave() for reads.
|
#4
|
|||
|
|||
Nice, I think it's better to make query_write() unbuffered query..
Thank you for the clarification |
#5
|
||||
|
||||
also, one which I use quite frequently is query_first() which returns the first result within an array so you don't have to do db_fetch_array() after the query_read(). Very useful for when you know your query will only return one row
|
#6
|
|||
|
|||
Thank you Antivirus,
Yes, it's also do free_result query |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|