![]() |
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? |
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. |
Unless timing is vital, you should use query_read_slave() for reads.
|
Nice, I think it's better to make query_write() unbuffered query..
Thank you for the clarification |
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
|
Thank you Antivirus,
Yes, it's also do free_result query |
All times are GMT. The time now is 11:55 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|