View Full Version : ado/sql: WHERE and VALUE are the same ?

07-11-2007, 12:59 PM
how to program
A table has lastname, firstname, salary,...
WHERE and VALUE are the same ? how I use VALUE ? Tell me for the two statements how use two conditions[eg lastname= "tom" firstname="smith" , AND or OR between] ? building a record set including records of names only of lastname, firstname ....
tell me also what to use with oRS.Filter=.... to get same result ?

07-11-2007, 02:08 PM
WHERE and VALUE are NOT the same.

WHERE is a conditional statement used in SQL. VALUE is used when inserting data into your database via SQL _OR_ an HTML attribute to the INPUT object.

As to AND & OR, it depends on what you are looking for. If you are looking for people with First Name TOM who also have a Last Name of Smith, then use AND. If you are only looking for people who's First Name is TOM, but also people who have a Last Name of Smith, then use OR.

Google 'SQL Statement Syntax' to learn more. Also, you can use the MySQL Documentation on SQL Statements to learn more. Here's the link (http://dev.mysql.com/doc/refman/5.0/en/sql-syntax.html)