Jump to content

PHP, MySQL easy quick santax question


anthonydamasco

Recommended Posts

Really simple

I have 2 columns in a table that I want people to be able to search from

here is my php

[code=php:0]

$result = mysql_query("SELECT * FROM employees WHERE firstname or lastname LIKE '%$search%'");

[/code]

i know "or" is wrong, because its only searching the "lastname" column, what is the correct santax?
Link to comment
https://forums.phpfreaks.com/topic/20016-php-mysql-easy-quick-santax-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.