RE: [PHP-DB] Concat 3 fields in a query

From: Date: Fri, 03 Dec 2004 19:40:01 +0000
Subject: RE: [PHP-DB] Concat 3 fields in a query
Groups: php.db 
Request: Send a blank email to php-db+get-37564@lists.php.net to get a copy of this message
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.

« previous php.db (#37564) next »