I am trying to create a mySQL statement that will select all records that begin with a particular letter.
For example, select all product names that being with letter ‘A’.
This is what I would like the results set to be like:
result[0] = "Awesome Bracelets";
result[1] = "Abalone Earrings";
result[2] = "Aloe Gel";
result[3] = "Amscot Figure";
I would not want the following result to be included:
result[3] = "Basic Ashtray";
This is what I tried, though it seems to return mixed results where some of the prod_name records do not have any words that start with an ‘A’:
"SELECT * FROM products WHERE prod_name LIKE '%A'"
I appreciate any help with this.
You are almost right