sql query not working with arabic names
-
hi
i have search form in a themeit search cars
i have this part of code
$manufacturer = get_option('wp_manufacturer_level1'); $arr_manufacturer = explode("\n", $manufacturer); foreach ($arr_manufacturer as $item) { $item = trim($item); $countmanufacturers = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts p, $wpdb->postmeta p1 WHERE p.post_status = 'publish' AND p.ID = p1.post_id AND p1.meta_key = 'manufacturer_level1_value' AND p1.meta_value = '$item'"); if ($countmanufacturers > 0) { $manufactureroptions = $manufactureroptions . "<option value='" . $item . "'>" . $item . " (" . $countmanufacturers . ")</option>"; } }
the problem here is with arabic names it stop counting cause there is a problem with sql query which i am not familiar with can some one help me?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘sql query not working with arabic names’ is closed to new replies.