Organizational Research By

Surprising Reserch Topic

how get all values in a column using php


how get all values in a column using php  using -'php,mysql,arrays'

I've been searching for this everywhere, but still can't find a solution: How do I get all the values from a mySQL column and store them in an array?

For eg:
 Table Name: Customers
 Column names: ID, Name
 # of rows: 5

I want to get an array of all the 5 names in this table. How do I go about doing that? I am using PHP, and I was trying to just:

SELECT names FROM Customers


and then use the

mysql_fetch_array


PHP function to store those values in an array.

Any ideas on this?

Thanks in advance!
    

asked Sep 14, 2015 by SalleyWengeri
0 votes
6 views



Related Hot Questions

6 Answers

0 votes
NULL
answered Sep 14, 2015 by CorGardner
0 votes
NULL
answered Sep 14, 2015 by DebraEusebio
0 votes
NULL
answered Sep 14, 2015 by MaybelleBidm
0 votes
NULL
answered Sep 14, 2015 by ScarlettReyn
0 votes
NULL
answered Sep 14, 2015 by MarciaYgvwgu
0 votes
NULL
answered Sep 14, 2015 by Bre9972

...