[eluser]amira_fcis[/eluser]
hi all,
i have 2 tables the 1st has names
the second has the values
i made join between 2 tables to get names and values
and i got result something like that
ahmed 1
ahmed 2
ahmed 3
and i want the result to be
ahmed
1
2
3
how can i get this result???
[eluser]sl3dg3hamm3r[/eluser]
You want fields from different columns in one column? This doesn't make sense... use php to achieve this.
[eluser]amira_fcis[/eluser]
thanks sl3dg3hamm3r for ur concern
no i doesn't mean that.i mean
NAME Value
ahmed 1
2
3
[eluser]sl3dg3hamm3r[/eluser]
That's the nature of joins: You might end up with redundant data like in 'Name', in your case. A result from a db-query is always a flat table (except deletes, updates) and not any kind of a tree consisting of nodes and leaves.
[eluser]amira_fcis[/eluser]
you mean that i never echo this result with any possible way??
[eluser]sl3dg3hamm3r[/eluser]
Err sure it is, that's why I said 'Use php' to achieve what you want. You will need to iterate over your result-set. If 'Name' was echoed and didn't change since last iteration, don't echo it anymore.
[eluser]amira_fcis[/eluser]
Any suggestions to do that...?coz i did my best but i couldn't reach my target result
thanks in advance