-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 7:58 PM +0800 4/30/00, Hello wrote:
>this is important to me because i get used to dividing a long MySQL 
>SQL statement into several lines and terminating them by a 
>terminator "END", for example,
>
>my $st=$db->mysql(<<END);
>SELECT album.* ,album.oid AS oid2,uinfo.name,uinfo.user, uinfo.gid, 
>uinfo.frs, count(alobj.oid) AS nobj,
>    (unix_timestamp()-unix_timestamp(album.birth)<$ndays*24*60*60) AS new
>    FROM  uinfo, album LEFT OUTER JOIN alobj USING (aid)
>    WHERE kind='$fdat{kind}' $search AND ($pref)
>    AND album.oid=uinfo.id
>    GROUP BY album.aid
>    LIMIT $fdat{limit}
>END

This isn't a fix to the bug, but I recently picked up another way of 
doing this which works much the same way and is a little cleaner:

my $st=$db->mysql(qq[
SELECT album.* ,album.oid AS oid2,uinfo.name,uinfo.user, uinfo.gid, 
uinfo.frs, count(alobj.oid) AS nobj,
    (unix_timestamp()-unix_timestamp(album.birth)<$ndays*24*60*60) AS new
    FROM  uinfo, album LEFT OUTER JOIN alobj USING (aid)
    WHERE kind='$fdat{kind}' $search AND ($pref)
    AND album.oid=uinfo.id
    GROUP BY album.aid
    LIMIT $fdat{limit}
]);
- -- 

Kee Hinckley - Somewhere Consulting Group - Cyberspace Architects(rm)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBOQw7NiZsPfdw+r2CEQI7iQCgr7q/moTHNaDQ4zvkQUoPvJfDI84Amwb/
TFY8dhAlYbDO1qU+ETegkK4A
=+lcX
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to