Raised This Month: $32 Target: $400
 8% 

SQLite set multiple values


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-09-2018 , 10:17   SQLite set multiple values
Reply With Quote #1

Format(sQuery, sizeof(sQuery), "UPDATE %s SET value = %s, timestamp = %i WHERE AuthId = \"%s\"", Name, Value, timestamp, AuthId);

This query throws an error, as I can't set value and timestamp together. How to set it?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 08-09-2018 , 10:50   Re: SQLite set multiple values
Reply With Quote #2

"timestamp" is an sql function...
mug1wara is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-09-2018 , 11:10   Re: SQLite set multiple values
Reply With Quote #3

Quote:
Originally Posted by mug1wara View Post
"timestamp" is an sql function...
Please also answer the thread's question so I won't need to ask again when I actually need it and tell me how to set and get the timestamp in sql
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Walgrim
AlliedModders Donor
Join Date: Dec 2015
Location: France
Old 08-09-2018 , 11:23   Re: SQLite set multiple values
Reply With Quote #4

If you want to get the timestamp, use the GetTime() function.
https://sm.alliedmods.net/new-api/sourcemod/GetTime
__________________
Walgrim is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 08-09-2018 , 11:23   Re: SQLite set multiple values
Reply With Quote #5

Sure, would be easier though if you tell us what error it is.
mug1wara is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-09-2018 , 11:49   Re: SQLite set multiple values
Reply With Quote #6

Quote:
Originally Posted by mug1wara View Post
Sure, would be easier though if you tell us what error it is.
Something near the symbol ","

@Walgrim

I meant getting and setting timestamp with sql.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 08-09-2018 at 11:50.
eyal282 is offline
Walgrim
AlliedModders Donor
Join Date: Dec 2015
Location: France
Old 08-09-2018 , 12:08   Re: SQLite set multiple values
Reply With Quote #7

Quote:
@Walgrim

I meant getting and setting timestamp with sql.
If I'm not wrong you want to set the playtime of a player using timestamp?
__________________
Walgrim is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-09-2018 , 13:35   Re: SQLite set multiple values
Reply With Quote #8

Quote:
Originally Posted by Walgrim View Post
If I'm not wrong you want to set the playtime of a player using timestamp?
I want last updated using timestamp
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-09-2018 , 17:32   Re: SQLite set multiple values
Reply With Quote #9

You are spamming the crap out of this forum with SQL help.

Have you consideres using google?

SQL [question]

Stackoverflow has all the answers.
__________________
Neuro Toxin is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 08-09-2018 , 18:30   Re: SQLite set multiple values
Reply With Quote #10

Quote:
Originally Posted by Neuro Toxin View Post
You are spamming the crap out of this forum with SQL help.

Have you consideres using google?

SQL [question]

Stackoverflow has all the answers.
I was gonna suggest to him to just make 1 thread called "SQL Questions" that he can just update with any new questions he may have. It seems that most of the threads he made just has Mug1wara mostly replying along with 1-2 other people.
__________________
Psyk0tik is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 08:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode