Sql Query Insert Problem
Hello guys,
i have a little problem with my db manager here , the thing is sometimes my bans will not insert into the db for the players name . because of the chars or anything else dont matter. here is what i do for my db manager first i escape the names with " SQL_EscapeString " then i put it into my sql then insert .... as i noticed it seems its not good enough ! every player with some special chars will cause an error which i cant see in my csgo logs :3 so here is my mysql config which i guess cause the problem or ... PHP Code:
so what is the problem here ? |
Re: Mysql Insert Problem
PHP Code:
|
Re: Sql Query Insert Problem
will it escape characters like | or ıllıll or any others as well ?
Edit: so basically using Escape function from database handler is better than the sql_escape thing ? Edit 2: Thanks it works great ! |
Re: Sql Query Insert Problem
Database.Format automatically escapes format specifiers for you.
PHP Code:
|
Re: Sql Query Insert Problem
Quote:
|
Re: Sql Query Insert Problem
Quote:
|
Re: Sql Query Insert Problem
Quote:
|
Re: Sql Query Insert Problem
Quote:
Taking the simple example of updating a players name stored in a database against a SteamID: Using Database.Escape correctly looks like this: PHP Code:
PHP Code:
|
Re: Sql Query Insert Problem
Quote:
|
All times are GMT -4. The time now is 14:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.