I'm trying to figure out how to fetch a cell's data from all rows in a MySQL table and then store the data in an array.
MySQL Table Name = classes
Column Type Comment
id int(11)Auto Increment
name varchar(75) []
teacher varchar(75) []
cost decimal(7,0) [0]
I want to create an array using the name value in the table from all the rows (13 total) in the table classes.
I believe I need something like this, but it isn't working.
$names = $db->fetchRows("select `name` from `classes`);
I'm not sure if I should use fetchRow or fetchRows and I'm not sure if I need something after classes.