Unstoppable Domains

PHP & MYSQL Problem (Should be simple) Help Needed

Spaceship Spaceship
Watch

BuLLDoG

Established Member
Impact
12
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:

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:
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
Hey thanks Eric for your response, but that is typing the NOT IN values in manually. Although, l think you have pointed me into the right direction.

Cheers
 
0
•••
Can you post your table structure with some sample data (e.g. query browser screenshot)? I think there might be some confusion about what exactly you're trying to do.
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back