Jump to content

[SOLVED] sql statement confused, someone explain?


jesushax

Recommended Posts

hi below is my sql

 

$VACSQL = mysql_query("SELECT * FROM tblVacancies WHERE Archive='0' AND CityCat LIKE '$CAT' OR ConsCat LIKE '$CAT' ORDER BY DateAdded DESC") or die(mysql_error());

 

what im trynig to do is get all records that have

 

Archive 0

and either City Cat or ConsCat is like the variable $Cat

 

at the moment if i click a CityCat link and the above sql is run on the next page it works

 

if i click a Cons Cat Link the sql above shows all the correct ConsCat but it shows all Archive

 

but the archive says only if 0, i dont understand why

 

can anyone help me out?

Cheers

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.