My guess is that what you want is actually to select all the rows, by using
SELECT * FROM table
however you could also be referring to having variables in your statement for testing purposes
example:
SET @var_name = expr [, @var_name = expr] ...
For SET, either = or := can be used as the assignment operator.
You can also assign a value to a user variable in statements other than
SET. In thiscase, the assignment
operator must be := and not = because
= is treated as a comparison operator in non-SET statements:
mysql
then you use them as follows:
SET @t1='audio';
mysql> SELECT @t1 FROM table;
that way you will always get the same result for your search and you can use the variable as needed. I also noticed that your audio is not spelled the same autdio
, can I assume that this is a typo. The biggest guess here is that you want to select either everything from the table to view it, like the first bit of code posted, or you want to select only key fields.
If you are selecting SELECT * FROM tablename WHERE id_products=13 AND name="audio" AND value="2.1" AND name="hdd" AND value="200 gb"
the problem remains that you never get any row in the database that matches this criteria.