Forum
Search
Members
Help
Hello There, Guest!
Login
Username:
Password:
Lost Password?
Remember me
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help
Threaded Mode
How to get value from MySQL database?
MasonSFW
Huge Clucker
Posts: 302
Threads: 64
Joined: Feb 2014
Reputation:
0
#1
20.09.2015, 11:38
This code, I tried to get integer value from db but its not
Find
Reply
BroZeus
High-roller
Posts: 1,398
Threads: 25
Joined: Jan 2014
Reputation:
0
#2
20.09.2015, 11:47
Thats incorrect usage of printf, use it like this
PHP код:
printf
(
"%d"
,
PlayerInfo
[
playerid
][
pAmmo1
]);
And instead of giving pic of code please paste the code.
And use cache_get_field_content_int for pSkyRank if its integer type.
Find
Reply
MasonSFW
Huge Clucker
Posts: 302
Threads: 64
Joined: Feb 2014
Reputation:
0
#3
20.09.2015, 11:52
pSpyRank is string (text)
Find
Reply
X337
Gangsta
Posts: 872
Threads: 25
Joined: Sep 2014
Reputation:
0
#4
20.09.2015, 12:47
Third parameter of cache_get_row must be a variable.
cache_get_row(row, field_idx, destination[], connectionHandle = 1, max_len = sizeof(destination))
Take a look at this :
https://sampwiki.blast.hk/wiki/MySQL/R33#cache_get_row
Find
Reply
«
Next Oldest
|
Next Newest
»
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
SA-MP
-- News and Updates
-- General
-- Client Support
-- Bug Reports
-- Screenshots and Videos
SA-MP Server
-- Server Support
-- Server Advertisements
SA-MP Scripting and Plugins
-- Scripting Help
---- Tutorials
---- Discussion
---- Help Archive
-- Gamemode Scripts
-- Filterscripts
---- Includes
---- Tools and Files
---- Maps
-- Plugin Development
SA-MP DL Edition
-- SA-MP 0.3.DL
---- Model Releases
Other
-- Everything and Nothing
Non-English
-- Languages
---- Nederlands/Dutch
------ Scripting Showroom en Discussie
------ Off topic
---- Español/Spanish
------ Lanzamientos/Releases
---- Français/French
------ Showroom
---- Русский/Russian
------ Релизы/Releases
---- Português/Portuguese
------ Lançamentos/Releases
---- Română/Romanian
------ Salonul Scripturilor
---- Archive
Users browsing this thread: 1 Guest(s)
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help