Log in

View Full Version : How to read from the database ?


mihai11
07-14-2007, 09:55 AM
Hi,

It seems that there are several functions for this: query_read, query_read_slave, query_first, query_first_slave. When it is appropiate to use each of them ?

Regards,
Razvan M.

Eric
07-14-2007, 10:01 AM
query_read(_slave) is for select queries, while query_first(_slave) will return the first row of the result. _slave will use the slave database (if there is one)

There's also query_write, which you can use for updates and inserts, etc.

Attilitus
07-14-2007, 10:23 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=119350&highlight=database+class" target="_blank">Using the vBulletin Database Class</a>

That is an excellent article that ought to give you all the information you need to know regarding the proper use of vBulletin's database class.

mihai11
07-14-2007, 10:47 AM
Using the vBulletin Database Class (https://vborg.vbsupport.ru/showthread.php?t=119350&highlight=database+class)

That is an excellent article that ought to give you all the information you need to know regarding the proper use of vBulletin's database class.

Thank you. This is very useful.