In my table I have a field "firstname" and a field "lastname". I would like to select all records where firstname + space + lastname is a certain value.

I've tried this:

$sql = "SELECT * FROM sam_users WHERE (user_firstname + ' ' + user_lastname LIKE ?)";


But this isn't working. With Google I've found something about using ||, but I don't really understand how I should use that operator. Note that I don't want to use an or-operator (what || is in many languages), but something to concatenate 2 fields (with a space between them) and using a LIKE on that.

Thanks!


Question: How to display zero value as blank cell in mac numbers 3.1
Answer: Here's a simple approach:  =If(A1&lt;=0," ",A1)

You're simple saying:  If the result displayed in Cell A1 is less than or equal to 0, display what's between the parenthesis.  It could be Yes, No, Blue, Green, or just Blank space.  If Cell A1 is greater than 0, display the value of that cell.

You don't have to leave a space between the "" for the formula to work.  Try a simple test of the formula on different values and watch as the cell will switch to a Blank value, if the Cell is less than or equal to 0.  Logic formulas using If, And, Or and If And switches are powerful tools in many calculations goals.