Parse error: syntax error, unexpected ‘}’ in C:\xampp\htdocs\admin\products.php on line 148 [closed]

I have updated your code here. so use this below code. you have forgot close this ) in this line like this while ($row=mysql_fetch_object($query)) <tr> <?php include(‘sql_connect.php’); ?> <?php $sql=”select * from hp”; $query=mysql_query($sql); if(mysql_num_rows($query)>0) { $i=1; while ($row=mysql_fetch_object($query)){ ?> <th scope=”row”><input type=”checkbox” /></th> <td class=”tm-product-name”><?php echo $hp_model; ?> </td> <td><?php echo $hp_type; ?></td> <td><?php … Read more

Submit cf7 form to cfdb as pdf/BLOB [closed]

What I have learned is that the screen shot method is not really possible. So what I have done is used a method prescribed here using FPDF: https://wordpress.org/support/topic/convert-pdf-file The last post is most instructive. The problem with this method is that it is not conditional regarding the form and so some if statements needed to … Read more

Create a WordPress Database query to find users who purchased specific product through WooCommerce [closed]

You’ll find details here: https://gist.github.com/lukecav/05afef12feaf980c121da9afb9291ad5 OR Another approach is https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query . Use if….else and store order data in Arr[product_id] = OrderArr Kindly accept my answer if it is of any help.

WP_Query with LIKE returns strange query

You can’t use LIKE to compare arrays. LIKE is used to check if a string matches, or partially matches, a value in the database. IN is used to check if a value in the database is in a given set of values. They are not interchangeable. The correct comparison to use in your case depends … Read more

Custom wordpress SQL statement for a website

I think this could be life saver for you . This is a simple function for creating multiple loops. It retrieves a list of latest posts or posts matching criteria. <?php $posts_array = get_posts( $args ); ?> <?php $args = array( ‘numberposts’ => 5, ‘offset’ => 0, ‘category’ => , ‘orderby’ => ‘post_date’, ‘order’ => … Read more

504/502 errors plauging our site

If you think a plugin is causing the problem, disable all plugins by renaming the wp-content/plugins folder. Then put the plugins (in the subfolders of wp-content/plugins) back into a new wp-content/plugins folder. Do a couple/three at a time to see if you can find a bad plugin. You might also reload WP 4.7.2 via the … Read more

I am unable to fetch json data from wp_db

$user1 = $wpdb->get_results(“SELECT * FROM diary_user_form_storage”); foreach ($user1 as $key => $value) { $productString = stripslashes($value->product); $product=json_decode($productString,true); $error_p = implode(‘ ‘, $product[0]); echo $error_p; } Out will be PRODUCT 2 PRODUCT 5