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: Error in dsPIC33 Family Reference Manual Oscillator?
Answer: You appear to have your \$F_{SYS}\$ and \$F_{OSC}\$ formulae mixed up, per the datasheet you cited.


\$F_{SYS} = F_{IN} \cdot \dfrac{(PLLDIV + 2)}{(PLLPRE + 2)}\$
\$F_{OSC} = F_{IN} \cdot \dfrac{(PLLDIV + 2)}{((PLLPRE + 2) \cdot 2 (PLLPOST + 1))}\$


By my math, with a 20MHz crystal and the following settings, you should get 240MHz at \$F_{SYS}\$ and 120MHz at \$F_{OSC}\$:


PLLPRE: 4
PLLDIV: 70
PLLPOST: 0


\$F_{SYS} = 20MHz \cdot \dfrac{72}{6} = 240MHz\$

\$F_{OSC} = 20MHz \cdot \dfrac{72}{(6 \cdot 2)} = 20MHz \cdot \dfrac{72}{12} = 120MHz\$