I have a MySQL database, which is accessed via php, one of the tables is named products, within the table is a field named products_model, which contains all the products used for the application. Some start with DVD, some with VHS, others with DJ, SE, etc. What i am wanting to do is to select and display only certain items, where I can use the first two or three characters to filter for displaying.
All products_model have up to 8 alpha-numeric characters.
I know this is basic, however I am just learning. The section marked in red is what I am trying to figure out how to code that.
Any help is appreciated.
here is the line I want to modify:
$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name" . $new_fields . " from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1'" . SHOW_PRODUCTS_NEW_SINCE2 . [red]"and p.products_model = "[/red] . " and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'" . $order_by;