SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 26/11/2012, 11:33 AM   #11
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629
Posts: 13,338
Reputation: 1911
Default Re: How to fetch a result set from a MySQL database. The correct way.

What if what the database stores increases (excess data), changes order (messed up parsing), or decreases (no error checking)? Often yes, you do want all the data, I'd still argue that it's better to be explicit but won't push it as you do have a point too.
__________________
Y_Less is offline   Reply With Quote
Old 01/12/2012, 12:00 AM   #12
mamorunl
High-roller
 
mamorunl's Avatar
 
Join Date: Feb 2007
Location: Emmen/Netherlands
Posts: 3,795
Reputation: 1032
Default Re: How to fetch a result set from a MySQL database. The correct way.

Some small errors in your code: the function name should be "OnHousesLoaded" (yours is OnHouseLoaded) and the i++ should be idx++

Other than that, great tutorial
__________________

Created by Kellicia
Occupation: Web developer
mamorunl is offline   Reply With Quote
Old 05/12/2012, 02:39 PM   #13
Johnson_boy
Big Clucker
 
Join Date: Mar 2011
Location: Finland
Posts: 162
Reputation: 34
Default Re: Respuesta: How to fetch a result set from a MySQL database. The correct way.

Quote:
Originally Posted by irinel1996 View Post
You don't like the cache functions? As I see you didn't use it. As BlueG said it's much faster.
Nice one.
This is definitely better way than querying the database separately for each house, yet
the cache functions of BlueG's plugin are even faster. Therefore I would recommend
anyone to use the cache functions.
Johnson_boy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql fetch [rep+] TheDeath Scripting Help 0 28/07/2012 07:26 PM
MySQL fetch boolean Killer#Mummy Help Archive 0 21/07/2011 09:08 PM
How to return mysql result? ajwar Help Archive 2 21/07/2011 10:00 AM
Mysql Fetch Problem. KyleSmith Help Archive 6 08/11/2010 06:38 PM
MySQL Query Result Reynolds Help Archive 6 08/07/2010 02:04 PM


All times are GMT. The time now is 06:37 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.