RE: [PHP-DB] Concat 3 fields in a query
| From: | Khristopher_Klaich at nywd dot uscourts dot gov | Date: | Fri, 03 Dec 2004 20:44:42 +0000 |
| Subject: | RE: [PHP-DB] Concat 3 fields in a query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37566@lists.php.net to get a copy of this message | ||
Thank you again for the help. I have constructed my sql statements and am
able to insert and update the data with the help everyone's feedback.
Martin, thanks for the little turotial on strings it makes sense now and
sorry if I mis-posted my question to this list.
Khris
"Norland, Martin" <Martin.Norland@STJUDE.ORG>
12/03/2004 02:40 PM
Please respond to
<php-db@lists.php.net>
To
<php-db@lists.php.net>
cc
Subject
RE: [PHP-DB] Concat 3 fields in a query
http://www.php.net/manual/
http://www.php.net/manual/en/language.types.string.php
Basically:
* quoting with ' is when you just literally want that
string
output.
You can't call functions or print variables values within
it.
e.g. print 'hello_world()
$name';
prints just that.
* if you want to quote with ' - you'll have to mix it up.
e.g. print hello_world() . ' '
. $name;
* the {}'s we saw earlier is a way of explicitly telling
php to
analyze the whole thing, not just the first bit.
e.g. print
"$_POST['PO_YEAR']";
equates to
print $_POST .
"['PO_YEAR']";
and is properly written
print
"{$_POST['PO_YEAR']}";
My apologies to both the list for a non-db related post, and to anyone
whos client munges this up something fierce. Outlook will likely strip
the extra line feeds - click the little yellow box at the top for
legibility.
Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php