global $wpdb;
/* wpdb class should not be called $wpdb variable is an instantiation of the class already set up to talk to the WordPress database */

$result = $wpdb->get_results( “SELECT * FROM chains_details where chains_type_id=2 and chain_status=1″); /*mulitple row results can be pulled from the database with get_results function and outputs an object which is stored in $result */

//echo “

"; print_r($result); echo "

/* If you require you may print and view the contents of $result object */

Sterling Silver

Hand Made Chains

  • * Chains available in various length as per order
  • * Minimum Order 250 Grams each design
  • * All chains are with spring ring lock

Select products for there pricing and information

foreach($result as $row)
$c_id="product_" . $row->chains_id;

$c_name =str_replace(“\\”,”",$c_name);
$c_code =str_replace(“\\”,”",$c_code);
$c_size =str_replace(“\\”,”",$c_size);
$c_length =str_replace(“\\”,”",$c_length);
$c_weight =str_replace(“\\”,”",$c_weight);


$c_length_arr = split (“,”, $c_length);
$c_weight_arr = split (“,”, $c_weight);



Length Weight
All Sizes are available

/* Print the contents of $result looping through each row returned in the result */


If any custom requirement or any other chain required.
Select products