2005/9/17, Alvaro Cobo <[EMAIL PROTECTED]>:
> Hi all:
> 
> I've searched into the MySQL manual but I can't find the solution to this 
> very silly question.
> 
> I have a select query where I need to filter the data using the WHERE 
> statement. But also need to have an option to show all the data in the table.
> 
> For example (something like...):
> 
> SELECT * FROM `tbl_table1`  WHERE field1 = 'Test' #To show all the rows where 
> field 1= 'Test'
> 
> But also have the choice to select all the rows using something like:
> 
> SELECT * FROM `tbl_table1`  WHERE field1 = * or ALL or %  #Select all the 
> fields.
> 

You need to select all rows, but you have only control on the
condition on flied1, I am right ?
If you can input %, it should do the trick.
select * from table WHERE field1 like '%';
Why can't you do just 
select * from table ??


-- 
Pooly
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to