Raised This Month: $ Target: $400
 0% 

return string from sql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 01-07-2011 , 14:45   return string from sql
Reply With Quote #1

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...
reinert is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-07-2011 , 14:48   Re: return string from sql
Reply With Quote #2

Code:
// new string[33][32]
// on client_disconnect : string[index][0] = '^0'
// getting string : SQL_ReadResult( Query, 6, string[id], charsmax( string[ ] ) )
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
reinert
Veteran Member
Join Date: Feb 2007
Old 01-07-2011 , 15:33   Re: return string from sql
Reply With Quote #3

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
reinert is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-07-2011 , 16:05   Re: return string from sql
Reply With Quote #4

MySQL Doesnt accept that simbols.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
reinert
Veteran Member
Join Date: Feb 2007
Old 01-07-2011 , 16:44   Re: return string from sql
Reply With Quote #5

So that's impossible ?
reinert is offline
Pantheon
Member
Join Date: Jan 2011
Old 01-07-2011 , 17:07   Re: return string from sql
Reply With Quote #6

Quote:
Originally Posted by reinert View Post
So that's impossible ?
maybe try putting a \ before the \

Example:

\\
Pantheon is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 01-07-2011 , 21:42   Re: return string from sql
Reply With Quote #7

Backquote string before saving it in sql using SQL_QuoteString.
__________________
Impossible is Nothing
Sylwester 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 02:00.


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