is there an easier way to select a column by a vlaue without making a query for it i.e.
instead of:
fielddef_id=12 AND value >= '$bedrooms'
and just using something like:
fielddef_id[12] WHERE value >= '$bedrooms'
this has become the reason I haven't been able to sleep as much! i can also...
there is nothing i can do about the [unspecified] being output if nothing is there. however, i have added if statements to change the values to 1 if nothing is entered. however, i still get errors.
to ber honest, it doesn't matter if the query gets product_id from cms_module_products_fieldvals...
product_id is in the cms_module_products_fieldvals table
id is in the cms_module_products table
[unspecified] is what is sent if nothing is entered into any of the parameters. it may be best to test using the letter M in the postcode field, and just selecting the lowest values for the other two...
unfortunately didn't work. check out the form itself:
http://www.northernflats.co.uk/flats-to-let/search
the next page also outputs $query so you can see what is going on...
yes. the 3 columns in cms_module_products_fieldvals are:
product_id
fielddef_id
value
from this, product_id connects with the table cms_module_products with the column "id" - this is the primary key column
i don't just want a list of product IDs. what i actually want to do is output more info...
cms_module_products - i only need the product ID to output from this table, but may need to use the price column if entered.
then i need from cms_module_products_fieldvals:
fielddef_id is the identifier
value is the value within the fielddef_id
fielddef_id 21 has to be false
fielddef_id 8 or...
Hi,
I am using a CMS system called CMS Made Simple and have made an SQL query based on a search form.
The search form has 3 possible inputs - postcode, number of bedrooms, and minimum rent.
I want to create a query based on the data entered in the 3 inputs above. If the user does not enter...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.