Cnic Posted March 3, 2019 Share Posted March 3, 2019 Salutare, ma chinui sa fac un script care sa imi gaseasca features pentru un produs in mod automat. In product_lang am la descriere de exemplu: Quote Raza de acţiune a iluminării IR</span></span>:</TD> <TD class="tab_value">40 m</TD> l-am luat copy paste si l-am pus in feature_value intr-un camp search, cand compar description cu search nu il gaseste de nici un fel folosesc: $get_features = "SELECT id_feature from ps_category_features WHERE categories like CONCAT('%i:','$category',';%')"; $features = mysql_query($get_features); while ($row_feature = mysql_fetch_array($features)) { $id_feature = $row_feature['id_feature']; $get_values = "SELECT id_feature_value, search_str from ps_feature_value WHERE id_feature = '$id_feature'"; $values = mysql_query($get_values); while ($row_values = mysql_fetch_array($values)) { $id_value = $row_values['id_feature_value']; $search_str = $row_values['search_str']; if (stripos($description, $search_str) !== false) { echo 'gasit feature ' . $id_feature . 'cu value ' . $id_value; } } } Idei? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now