Jump to content
Old threads will finally start getting archived ×

fataqui

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by fataqui

  1. instead of... '{$i}', // need to put id here (NOT auto incrementing) do something like... '" . ( $i + 1 ) . "', // need to put id here (NOT auto incrementing)
  2. $total['sum(total)'] is not equal to $total['SUM(total)'] keys are CASE Sensitive
  3. There is all kinds of ways to do it, you could just use a simple regex. Here some code I had lying around... <?php $url = 'http://www.cheapsmells.com/viewProduct.php?id='; $item = '3978'; $parts = array ( array ( '<div class=\'productOriginalPrice\'>', '</div>' ), array ( '<div class=\'productOurPrice\'>', '</div>' ) ); $out = array ( 'original' => '', 'current' => '' ); if ( false !== ( $page = file_get_contents ( $url . $item ) ) ) { foreach ( $parts AS $name => $value ) { if ( false !== ( $s = stripos ( $page, $value[0] ) ) ) { $page = substr ( $page, $s + strlen ( $value[0] ) ); $out[($name == 0 ? 'original' : 'current' )] = preg_replace ( '/(.+?)(\d+\.\d+)(.+?)?/is', '\\2', substr ( $page, 0, strpos ( $page, $value[1] ) ) ); } } } print_r ( $out ); ?>
  4. You can also do it like this... SELECT eventName FROM events ORDER BY addedToScheduleCurr DESC LIMIT 1;
×
×
  • 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.