PHP & MYSQL Problem (Should be simple) Help Needed

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
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
Close
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
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back