Marty Rogers
Account Closed
- Impact
- 3
Hi,
Just wondering if anybody can help me, im doing a simple search feature on my new website and i have a column called type and i have entered MySpace Codes and MyCrib Codes in these for some of my row entries, i want visitors to be able to search just the myspace codes entries, i don't want any mycrib code entries to come up when searching.
I had this originally for my search:
SELECT * FROM codes WHERE name LIKE '%$name%'
Then tried changing it too:
$query = "SELECT * FROM codes WHERE type = 'MySpace Codes' AND name LIKE '%$name%'"
I also tried adding WHERE after AND but still no luck. Can anyone help me with this?

Just wondering if anybody can help me, im doing a simple search feature on my new website and i have a column called type and i have entered MySpace Codes and MyCrib Codes in these for some of my row entries, i want visitors to be able to search just the myspace codes entries, i don't want any mycrib code entries to come up when searching.
I had this originally for my search:
SELECT * FROM codes WHERE name LIKE '%$name%'
Then tried changing it too:
$query = "SELECT * FROM codes WHERE type = 'MySpace Codes' AND name LIKE '%$name%'"
I also tried adding WHERE after AND but still no luck. Can anyone help me with this?








