How to combine some rows data into one string?
Hi guys! I have a table in mysql database. I get user's info with:
Code:
SELECT * FROM `table` WHERE steamid='%s'Example: (these are the values from the column in all returned rows) 1. a 2. b 3. c 4. d 5. e 6. f And I want to combine them all in one string: Code:
new combine[32] = "abvdef" |
Re: How to combine some rows data into one string?
PHP Code:
|
Re: How to combine some rows data into one string?
Quote:
So one more time - I get all rows I need with: SELECT * FROM `table` WHERE steamid='%s' then from each row, I want to get the value from the column test, and finally to combine all values in one string. |
Re: How to combine some rows data into one string?
When you retrieve a single value, add it to the string.
PHP Code:
|
Re: How to combine some rows data into one string?
I can't really get it. How can I retrive the data from the column of all rows? Can you give me an example, please?
If szValue equals to SQL_ReadResult(Query, 3) it only gets the data from the first row. I want to combine the data from all returned rows. |
Re: How to combine some rows data into one string?
Are you asking how to do it with SQL or how to combine data that was retrieved?
|
Re: How to combine some rows data into one string?
PHP Code:
|
Re: How to combine some rows data into one string?
Why use formatex() without any formatting? Use copy() or add().
|
Re: How to combine some rows data into one string?
Quote:
|
Re: How to combine some rows data into one string?
Quote:
Quote:
|
| All times are GMT -4. The time now is 20:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.