AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   return string from sql (https://forums.alliedmods.net/showthread.php?t=147284)

reinert 01-07-2011 14:45

return string from sql
 
Hey, how to get string from sql ???

The string is with spaces also...

I've tried just creating array:
PHP Code:

new iString[33]; 

then just
PHP Code:

iString[id]     = SQL_ReadResult(Query6); 

Doesn't work...

lucas_7_94 01-07-2011 14:48

Re: return string from sql
 
Code:

// new string[33][32]
// on client_disconnect : string[index][0] = '^0'
// getting string : SQL_ReadResult( Query, 6, string[id], charsmax( string[ ] ) )


reinert 01-07-2011 15:33

Re: return string from sql
 
OK thanks it works well, but one more question, what if I'm getting string with messagemode, and the text contains \, then I've checked the MySql and the text was without "\" :(( it doesn't save slashes

lucas_7_94 01-07-2011 16:05

Re: return string from sql
 
MySQL Doesnt accept that simbols.

reinert 01-07-2011 16:44

Re: return string from sql
 
So that's impossible ?

Pantheon 01-07-2011 17:07

Re: return string from sql
 
Quote:

Originally Posted by reinert (Post 1388345)
So that's impossible ?

maybe try putting a \ before the \

Example:

\\

Sylwester 01-07-2011 21:42

Re: return string from sql
 
Backquote string before saving it in sql using SQL_QuoteString.


All times are GMT -4. The time now is 02:00.

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