Robert Hurst
Forum Replies Created
-
Sorry for not getting back right away. Interesting, I’ll go see what can be done and make a diff.
actually I was thinking more like some time between now and WordPress 3.4. WordPress 4 is too long away.
By the way I didn’t mean to come down on WordPress 3.0, Its the best yet by miles. I just see MySQL dependency as a great detriment in the future.
Forum: Alpha/Beta/RC
In reply to: WP 3 Alpha/BetaI’m about 99% sure that if you’d copied the WP 3.0 files up over your 2.9.2 MU build, it would have upgraded just fine 🙂 I’ll find out when it’s time to upgrade, though 😉 I have an MU waiting for the marriage.
I’m gonna give it a try. I let you know how it goes. I’m a freelancer and I use WordPress MU for a number of projects. I’d really like to setup a way from it. I’ll just import a couple of blogs to my localhost install, then copy WordPress 3.0 over it. If this works I’ll be really quite happy.
Forum: Fixing WordPress
In reply to: trying to convert a fuction that uses mysqli to use the wpdb classi figured it out this is what I have now
function get_product_manufacturers($var=NULL) { global $wpdb; $query = 'SELECT * FROM akt_products ORDER BY id asc'; $results = $wpdb->get_results($query); foreach($results as $row) { $manufacturers_all[$row->id] = stripcslashes(htmlspecialchars_decode($row->manufacturer)); $manufacturers = array_unique($manufacturers_all); } if($var=='all') { return $manufacturers_all; }else{ return $manufacturers; } } function get_product_categories($var=NULL) { //get the catergories global $wpdb; $query = 'SELECT * FROM akt_products ORDER BY id asc'; $results = $wpdb->get_results($query); foreach($results as $row) { $categories_all[$row->id] = stripcslashes(htmlspecialchars_decode($row->category)); } //build the array - NOT UNIQUE! $manufacturers_all = get_product_manufacturers('all'); if($var==NULL): break; elseif($var=='all'): $categories = array_unique($categories_all); else: $i=0; foreach($manufacturers_all as $key => $manufacturer) { if($manufacturer != $var) {} elseif($manufacturer == $var) { $categories_current[$i] = $categories_all[$key]; } $i++; } $categories = array_unique($categories_current); endif; return $categories; }