#1

I couldn't find a proper tutorial or a filterscript that might help me out. Can i please, see a code, that saves 2 things with a value?
Also reading. I would appreciate this a lot!
Reply
#2

Код:
UPDATE <tableName> SET <fieldName> = '', <fieldName2> = '' WHERE <matchingCriteria> = ''
Example in use:

Код:
UPDATE playerAccounts SET playerName = 'Calg00ne', playerAdminLevel = 2 WHERE playerID = 6
Integers do not need to be wrapped in single quotes, format your query to set the values as necessary, then simply send it out with mysql_query (you *probably* won't need to thread this query).
Reply
#3

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Код:
UPDATE <tableName> SET <fieldName> = '', <fieldName2> = '' WHERE <matchingCriteria> = ''
Example in use:

Код:
UPDATE playerAccounts SET playerName = 'Calg00ne', playerAdminLevel = 2 WHERE playerID = 6
Integers do not need to be wrapped in single quotes, format your query to set the values as necessary, then simply send it out with mysql_query (you *probably* won't need to thread this query).
So this sets admin level 2 on user with id 6 ?

I actually wanted a complete filterscript on how to do it, with everything, db_open, db_query and all these.
New to SQL so this is why ...
Reply
#4

Search, there's thousands of tutorials on the internet and there's thousands of tutorials explaining usage of the MySQL/SQLite functions.
Reply
#5

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
So this sets admin level 2 on user with id 6 ?

I actually wanted a complete filterscript on how to do it, with everything, db_open, db_query and all these.
New to SQL so this is why ...
SA-MP wiki to the rescue:

db_open
db_query
db_close
Reply
#6

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Search, there's thousands of tutorials on the internet and there's thousands of tutorials explaining usage of the MySQL/SQLite functions.
Oh, so i can find stuff even on ****** about SQL? Okay then, thanks, i will see what i can learn from there.
Reply
#7

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
Oh, so i can find stuff even on ****** about SQL? Okay then, thanks, i will see what i can learn from there.
http://www.sqlite.org/
http://www.sqlite.org/lang.html
Reply
#8

....facepalm
Reply
#9

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
....facepalm
Yeah, your sarcasm is always impressive. I never dealt with any databases, so please don't act like a smartass.
Thanks for the help....
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)