Your syntax for where is wrong it should be
$user1 = $wpdb->get_results("select product,checked_by,submit_date,unit_data,temperature_in,temperature_out,time_in, time_out,category from diary_user_form_storage where category_name="opening" OR category_name="closing" order by submit_date");
Related Posts:
- Fatal error: Call to undefined function mysql_connect()
- Query both first_name and last_name from wp_usermeta at the same time
- How to get the list of WooCommerce product image of a certain category from database?
- How to add query vars with paginated URLs?
- Changing user_nicename
- WordPress will not operate correctly
- How to Join two tables from separate databases within WordPress
- tag search using WP_Query
- simple wordpress ajax plugin not working when not logged in
- Install will not load: PHP does not have MYSQL installed
- Insert post without actions/hooks
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- Import 10,000 Users into WordPress WITH a specific ID for each user
- if statement on database query
- Is the regular ajax request method safe or I should use admin-ajax.php?
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- How to get the post_id from postmeta
- Sortable admin column for one meta key with three possible meta values
- WordPress Ajax Custom Query – High CPU LOAD
- AJAX in WordPress, sending coords data to MySQL and show after into map
- Styling images coming from another blog
- register_activation_hook isn’t adding table to DB
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- How to convert objects into arrays
- Ajax $wpdb not returning table data
- Converting MYSQL to WordPress $WPDB
- Is there a way to get 3+ dimensional array from a single MySql command
- Custom Plugin For Converting CSV To MySQL
- Checking for new message using AJAX and PHP. Server overload?
- Can’t get wp_insert_post to work
- mysql query from wordpress page using custom table
- Importing Geo data into wordpress database
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- How to check if a meta value has already been assigned to any user?
- wp query foreach deleting record returning only first or last item
- inserting a post from an extern php file but post content doesn’t show on wp site
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- $wpdb->wp_users returning empty value for
- Help with a $wpdb MySQL Query
- How i can obtain all the post meta for a specific post as an array?
- Grouping posts by a custom meta value
- Mixing variables into an array when inserting values
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- Make a database query using WordPress
- WordPress Custom SQL Table with UserID Filter for results
- How can I add a new row in a separate database when someone registers via WordPress?
- I can’t update my data through $wpdb
- Output: “Array”
- How to use mysql LIKE with wpdb?
- How to use AJAX in WordPress in MYSQL query?
- Use variable in SQL statement
- Live search from database table
- Processing ajax call to php to insert into mysql database
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- How to create Loop code for Menu using WordPress?
- WordPress Custom Query: Combining Two Functions
- MySQL Query Returns Array () In Shortcode
- How to WP_Query posts order by parent title?
- Passing in MySQL prepare statement parameter separately throwing error
- Convert a column of a table containing an Array as response in HTML
- Database SQL query error
- Error establishing a database connection (Set-up locally)
- MYSQL TIMESTAMP when adding DATE_FORMAT then the output is blank, PHP conflict?
- Updated Php version from 5.4 to 7.2 and getting “PHP installation missing the MySQL extension needed by WordPress”
- Conditional formatting on data fetched from MYSQL
- how to get data from two different table from wordpress database
- Passing Current User ID into SQL statement
- How to optimize and reduce excessive database queries
- How to insert multiple rows and columns in database using array
- Store GA Client ID in User DB
- PHP 7.2.18 | Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- Windows Setup: Error establishing a database connection
- Need help with format of nested array in MySQL
- WP + MySql db / PHP
- WAMP SERVER Command Prompt SET PATH=%PATH%
- Inserting other fields to existing registration form in a WordPress theme
- Advanced WordPress SQL Query
- Splitting table data to pages with numbers
- How can get all users by current user meta (array)?
- Site doesnt work once PHP changed to 7.1
- How to detect if a revision was made by woocommerce or wordpress?
- WordPress WPDB::insert 13th param is always blank (only if format)
- Ajax not updating to database
- can’t delete a row from post_meta table
- MySQL query in WordPress with AJAX
- Processing forms with php to wordpress database
- directorypress theme error mysql_error() [closed]
- How to connect database table to each registered wordpress user.
- retrieve wordpress post-meta using php not wordpress functions
- Splash pages on a high traffic site
- Using the same shortcode to show any table from the database
- I am unable to fetch json data from wp_db
- Submit cf7 form to cfdb as pdf/BLOB [closed]
- How to send push notification in android using php? [closed]
- Getting invalid user ID error when creating a new user with wp_insert_user
- Custom form that stores data in mysql database
- Putting form result in my database
- How can I update a value of a field depending on outside source?
- WordPress Query with meta_key and order by another meta_key