PHP Using PHP with MySQL Connecting PHP to MySQL Selecting Products

morgan nokringer
morgan nokringer
3,576 Points

i don't any langage to do that before where can i do to select name in product?

Write the SQL query to select 'name' and the 'price' from the 'products' table. is for this exercice any part of the chapter say how to select a column form a database how can i do that

2 Answers

J J
J J
12,914 Points

() SELECT name, price FROM products ()

Henry Goh
Henry Goh
20,201 Points

Like what JJ answered. To select specific columns, you need to declare the column/field names after the SELECT statement.

SELECT name, price FROM products