RE: [PHP] MySQL query length

From: Date: Tue, 28 Aug 2001 06:53:38 +0000
Subject: RE: [PHP] MySQL query length
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64737@lists.php.net to get a copy of this message
You can alter the packetsize mysql will accept, you can find out the current setting with a "show variables" query, look for the max_allowed_packet var. You can alter it in your my.cnf file. (i have it on 25M atm). - Kees > -----Original Message----- > From: Niklas Lampén [mailto:niklas.lampen@publico.fi] > Sent: Tuesday, August 28, 2001 8:51 AM > To: Php-General > Subject: [PHP] MySQL query length > > > Can it cause any problems if mySQL query is very long? I have to compare > many words to many fields in my DB and I've done it like > "....Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field > LIKE > '%searchword%'.....". Query is build by a function, so I don't know the > exact length but it is VERY long. I also have to compare several words to > one field so I've done many of those "Field LIKE '%blah%'" for those > too. > Is there any smarter way to do this? > > > Niklas Lampén > Internet Developer > PubliCo Oy > Ruoholahdenkatu 8 A > FIN-00180 HELSINKI > P. +358 - 9 - 6866 2541 > F. +358 - 9 - 685 2940 > E. niklas.lampen@publico.fi > W. www.finlandexports.com > >

« previous php.general (#64737) next »