Jump to content

Echoing mysql query in one line


xero

Recommended Posts

Hello everyone.
Been looking around this nice site a little now and started to get a hang of things, but i've been bugged with a little something.
I'm trying to show all results from a mysql query in one line.
i.e:

[code]SELECT handle FROM users[/code]

A simple querry that will print out all the handles from a table, tryed to loop a little but i'm not shure how to make it show all lines.
How can i extract all of the results easly into a single variable (not array) as a text line?
i.e: $variable = "handle1, handle2, handle3"
Might be only me that aint thinking straight. Hope someone can give me a little boost here :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.