Changeset 45270
- Timestamp:
- 05/11/08 17:48:14 (2 months ago)
- Files:
-
- bsuite/trunk/core.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bsuite/trunk/core.php
r45267 r45270 606 606 $s['sess_bl'] = $se['bl']; 607 607 608 if ( false === $wpdb->insert( $this->hits_sessions, $s )) 609 return new WP_Error('db_insert_error', __('Could not insert term into the database'), $wpdb->last_error); 608 if ( false === $wpdb->insert( $this->hits_sessions, $s )){ 609 new WP_Error('db_insert_error', __('Could not insert session into the database'), $wpdb->last_error); 610 return( FALSE ); 611 } 610 612 $session_id = (int) $wpdb->insert_id; 611 613 } … … 660 662 if( ( $referers = implode( $this->get_search_terms( $hit->in_from ), ' ') ) && ( 0 < strlen( $referers ))) { 661 663 $term_id = $this->bstat_insert_term( $referers ); 662 echo "<h2>$referers</h2>";663 print_r( $term_id );664 664 $searchwords[] = "($object_id, $object_type, $term_id, 1, '$hit->in_time')"; 665 665 } … … 707 707 update_option( 'bsuite_doing_migration_status', $status ); 708 708 } 709 /* 709 710 710 if( count( $res )){ 711 711 if ( false === $wpdb->query( "DELETE FROM $this->hits_incoming WHERE in_time < '$since' ORDER BY in_time ASC LIMIT ". count( $res ) .';')) … … 714 714 $wpdb->query( "OPTIMIZE TABLE $this->hits_incoming;"); 715 715 } 716 */ 716 717 717 /* 718 718 $posts = $wpdb->get_results("SELECT object_id, AVG(hit_count) AS hit_avg
