[SQLite Help] Insert Into doesn't work?
#1

I started making a SQLite based mode and everything was going great until i came to the point of registration :P

I made the database (baza) and all the other 'query commands' (if it's not how they are called forgive me..) like select, create work except for insert into.. I mean i don't see a mistake and I've checked tutorials that work fine like this but it just won't create a row in the DB

At first I thought there were too many enteries at once (around 15 I guess) so I set it just for name and password but it still doesn't work..

Then I thought my dq string size was too small so I set it to 500 to test and it still doesn't work..

Код:
format(dq,sizeof(dq),"INSERT INTO `users` (`name`, `pass`) VALUES('%s', %s')",dbescape(name),dbescape(password));
		db_query(baza,dq);
I've renamed DB_Escape to dbescape for typing reasons ...

Thanks in advance
Reply
#2

pawn Код:
format(dq,sizeof(dq),"INSERT INTO `users` (`name`, `pass`) VALUES('%s', %s')",dbescape(name),dbescape(password));
        db_query(baza,dq);
You're missing an ` on the second %s in VALUES.
Reply
#3

And here I thought I wasn't an idiot..

Thanks man!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)