Here we go again!
I'm trying to do some form entry verification and am trying to figure
out how to verify if there are 4 fields entered:
f_nameIN, l_nameIN, f_name2IN, l_name2IN
Verifying for each is ok, but somewhat tortured and long. I thought of
using CONCAT_WS but it doesn't seem to listen to me.
The manual is not very explicit as to where it can be used and by the
examples, it would seem that it can only be used in select statements.
Seems a little silly, no?
Here is what I found so far.
echo $f_nameIN," ", $l_nameIN;
returns joe whatever - ok, fine.
Obviously the string contains something. Right.
Now try this
$Author = CONCAT_WS(" ", $f_nameIN, $l_nameIN);
and it's a flop.
Am I missing a bracket, curly bracket or a baseball bat?
I thought maybe I should add AS Author - but that only seems to work in
a select statement. :'(
CONCAT_WS is a mysql function, it won't work in php.
You'd have to
select concat_ws(" ", first_name, last_name) AS author
in a mysql query.
Postgresql & php tutorials
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php