Adding an array in a SQL query
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #13
RE: Adding an array in a SQL query
(11-02-2010 07:32 PM)leefish Wrote:  I will give it some thought on the method to select the attachments to use - its just a shame that I can't share it as it is, so I will have a go at the suggested alternative solution...one step at a time though.
Can just have a setting for that, then stick them in the query.

Eg, comma delimited setting:

PHP Code:
$fields = $db->escape_string($mybb->settings['something']);
$fields = '"'.strtr($fields, array(' ' => '', ',' => '","')).'"';

$query = $db->query('... a.field IN ('.$fields.')');


My Blog
11-03-2010 08:08 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Adding an array in a SQL query - leefish - 11-02-2010, 04:58 AM
RE: Adding an array in a SQL query - RateU - 11-02-2010, 05:42 AM
RE: Adding an array in a SQL query - RateU - 11-02-2010, 07:02 AM
RE: Adding an array in a SQL query - techu - 11-02-2010, 12:16 PM
RE: Adding an array in a SQL query - RateU - 11-03-2010, 07:31 AM
RE: Adding an array in a SQL query - ZiNgA BuRgA - 11-03-2010 08:08 AM

 Standard Tools
Forum Jump: