Jump to content

Monkeymatt

Members
  • Posts

    35
  • Joined

  • Last visited

    Never

Everything posted by Monkeymatt

  1. It would be significantly faster, and use less server resources to have the thumbnail in the database, although I am against putting images in databases at all. I have done it before, but it is buggy, and writing the images to a file is significantly faster while using no more space. I would suggest moving away from images in databases if possible, but if you want to stay with images in databases, inserting a thumbnail into the database would most likely be significantly quicker while not taking too much extra space. Monkeymatt
  2. Your problem with the second query was that when the where was correct once, it did not only change that row, but it changed every row if the where was right at least once. Monkeymatt
  3. This will also check if those characters are in the string. [code] if (strpos('@', $str) !== false || strpos('.', $str) !== false ||  strpos(' ', $str) !== false) {    // space, period, or @ found } [/code] Monkeymatt
  4. Here's a way to search for state: [code] <?php // Let's say $str = the sample you posted // And $state is the state you want to search for $tmp_array = explode("\n", $str); foreach ($tmp_array as $value) {    $curr = explode("|", $value);    // check for whatever you want here    if ($curr[7] == $state) {       // print it out however you like       echo "<pre>";       print_r($curr);       echo "</pre>";    } } ?> [/code] You could simply extend that to search for other things. Monkeymatt
  5. How is this flatfile database configured -- what do the rows look like?
  6. $this->level_tracker[$i]['****code****'] is the data from a template file. I want to be able to pull all the stuff out of between <{loop_(section name)}> and <{/loop_(section name)}> not matter what is in there. Currently, preg is not matching any of the sections for me.
  7. How do I convert this eregi matching to preg, it works in eregi, but I can't get it to work in preg: [code] eregi("<{loop_".$section."}>(.*)<{/loop_".$section."}>", $this->level_tracker[$i]['****code****'], $contents); [/code] Here is the preg_match I tried, which does not work: [code] preg_match('|<{loop_'.$section.'}>(.*)<{/loop_'.$section.'}>|iU', $this->level_tracker[$i]['****code****'], $contents); [/code] Any help would be appreciated. Monkeymatt
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.