
Jul 21st, 2006, 06:02
|
|
Junior Member
|
|
Join Date: Mar 2006
Location: usa
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
An easy OR format question
Here is an easy question for someone.
I need a condition test for a DB entry and I think I'm doing it right, but the script is ignored, so something is wrong. I’ve written a couple of ways but so far no luck.
If an entry is not one of 4 types, I want to do something, so an OR seems like the right approach.
There may also be a better approach to this conditional.
When I echo $type, I am getting the correct response.
Any help would be appreciated!
if($type != 'Map' OR $type != 'Business Plan' OR $type != 'Site Plan' OR $type != 'Project Update')
{
$sql = ("insert into $tbl7
(
project,
doc_name,
doc_ref,
added_by,
type,
details
)values(
'$project_name',
'$doc_name',
'$doc_ref',
'$added_by',
'$type',
'$details'
)");
$result = mysql_query ($sql); // Run the query.
Any pointers?
|