MYSQL > SQLITE
#1

I'm converting a vehicle ownership mysql into sqlite. I know everyone would ask me why dont I use mysql. The answer is why I dont need this advanced system, and it's just a simple system. I know some mysql functions, and almost all of sqlite. But I'm having a problem on converting these into sqlite.

pawn Код:
mysql_fetch_field("Locked",data);
And this isn't converting correctly into that:
pawn Код:
db_get_field(qresult,CarID,data,256);
Returns that:
pawn Код:
C:\Documents and Settings\F e L i P e\Desktop\SAMP SERVER 0.3C\filterscripts\carsys.pwn(251) : warning 213: tag mismatch
With this one:
pawn Код:
db_get_field(qresult,"CarID",data,256);
returns
pawn Код:
C:\Documents and Settings\F e L i P e\Desktop\SAMP SERVER 0.3C\filterscripts\carsys.pwn(251) : error 035: argument type mismatch (argument 2)
As I saw on wiki and thought, should be like this.

Well, even though that, I'd like to ask also if there's not a mysql system, through a database file, since on sqlite we use: filename.db
Reply
#2

Try to use:
pawn Код:
db_get_field_assoc(qresult, "carID", data, 256);
Reply
#3

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
Try to use:
pawn Код:
db_get_field_assoc(qresult, "carID", data, 256);
Thx, did work :P. But how about the question of if there's any mysql system similar to sqlite, which uses a database file, with extension:
Код:
 .db
Reply
#4

The only one I know is SQLITE
Reply
#5

Well, but sqlite hasn't same functions as mysql has. Or are there same functions? Oo Cuz it seem to be easier for me
Reply
#6

Are you use free host on bay??
Reply
#7

no... I dont know what's that. Read my question
Reply
#8

Sqlite is hugely like mysql, the best way to learn is to ****** sqlite functions, that's how I learned
Reply
#9

Well, I can learn quickly, as I have this capacity. Are there any other functions except those one from wiki?
Reply
#10

Quote:
Originally Posted by blackwave
Посмотреть сообщение
Well, I can learn quickly, as I have this capacity. Are there any other functions except those one from wiki?
The wiki has all of them I think Or you could just look at the a_sampdb.inc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)