Skip to main content
Inspiring
March 24, 2010
Answered

Pull data from a Column insted of a row

  • March 24, 2010
  • 1 reply
  • 372 views

I know how to pull data from a row of an mysql db. But how do I pull the data on the same COLUMN in a MYSQL db? What do I need to send to the server side script?

E.g. The mysql holds 2 field names "COMPANY" and "CONTACT PERSON". How do I pull all the COMPANY names only?

Is this possible?

This topic has been closed for replies.
Correct answer kglad

use something like:


$result = mysql_query("SELECT * FROM " .$tableName. " WHERE 1");

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 24, 2010

use something like:


$result = mysql_query("SELECT * FROM " .$tableName. " WHERE 1");

Inspiring
March 24, 2010

Thanks - I got it!

kglad
Community Expert
Community Expert
March 24, 2010

you're welcome.