Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
monaya
Yak Posting Veteran
58 Posts |
Posted - 2015-02-20 : 16:55:16
|
Hey guys, I have a query that returns contacts connected to a client, but the problem is that it's only returning a result when a contact is associated with a client, even if the client does exist in the db. i want it to still return the client if the client exists.SELECT * FROM clients, addressbook where clients.clientid = addressbook.clientid AND (clients.clientname LIKE '" . strtoupper($_GET['txtfname'])."%') |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-02-20 : 17:00:47
|
SELECT * FROM clientsLEFT JOIN addressbook ON clients.clientid = addressbook.clientidWHERE clients.clientname LIKE '" . strtoupper($_GET['txtfname'])."%'Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|