Hi everyone,
I have two tables I want to access data from:
$tbl_name = itp
$tbl_name2 = s_contact
I have a query like this:
This query works perfectly, but I want to improvise on this query and include a NOT LIKE statement.
So for example, in the s_contact I have a field called 'completed_itp' it includes row ids for example it looks like this:
35, 12, 2, 5
I want my query now to include a statement to say don't bring back itp.id if they are included in the s_contact.completed_itp.
Hope you understand what I mean.
Thanks in advance, any help on this would be greatly appreciared :blink:
I have two tables I want to access data from:
$tbl_name = itp
$tbl_name2 = s_contact
I have a query like this:
PHP:
$query = "SELECT * ".
"FROM $tbl_name, $tbl_name2 ".
"WHERE $tbl_name.position = $tbl_name2.pos ".
"AND $tbl_name2.username =".
" '".
"$usern".
"'"
This query works perfectly, but I want to improvise on this query and include a NOT LIKE statement.
So for example, in the s_contact I have a field called 'completed_itp' it includes row ids for example it looks like this:
35, 12, 2, 5
I want my query now to include a statement to say don't bring back itp.id if they are included in the s_contact.completed_itp.
Hope you understand what I mean.
Thanks in advance, any help on this would be greatly appreciared :blink:








