cool hacks Site Search for phrases sent in the following hack... is used to implement a MySQL database in the Webstore.
check_db_with_product_id The web store takes this procedure and double checks that the order within the cart matches the product description in the MySQL database. This is a security check.

submit_query This routine submits a SQL query to the MySQL database and returns the results in an array for each row returned.

mysql_build_criteria This routine builds the WHERE query expression based on the search criteria.

Get the file here!