Not sure why you’re getting a WSOD, but immediately I can see that in the following:
$selectedSchoolName = $wpdb->get_results( "SELECT Name FROM tblYBSSchool WHERE
SchoolID=".$SelectedSchoolID );
// get selected location name
$selectedLocationName = $wpdb->get_results( "SELECT Name FROM tblYBSLocality WHERE
LocalityID=".$SelectedLocationID );
// get route ID
$getRouteID = $wpdb->get_results( "SELECT * FROM tblYBSRoute WHERE RouteID IN ( SELECT
RouteID FROM tblYBSRouteSchool WHERE SchoolID
=".$SelectedSchoolID.")".$SelectedLocationID);
…you should be using get_var
(which returns the first value of the first row, regardless of the query), not get_results
(which returns an array of objects, regardless of the query).
Have you enabled debugging?
Related Posts:
- Adding a Table to the wordpress database
- Custom Database Table and foreach
- What is my error trying to create a new table in the database?
- Backup the Database and Restore from the Backup?
- When is it appropriate to create a new table in the WordPress database?
- Creating search form for custom database table
- Can I use $wpdb for my custom tables in the WordPress database?
- What Is The Difference Between suppress_errors() And hide_errors() in $wpdb?
- Prevent WordPress from loading comments
- Suggestions for WPMU Migration (advanced)
- Retrieve and display data from custom db table in admin area?
- How to find if a post with custom_field == X exists?
- Custom search page and search by title, content and tag
- Get multiple db prefix with $wpdb
- How can I add data to a custom column in the Users section of the wordpress backend?
- What’s the proper way to use a custom table? [closed]
- How to retrieve the value stored in a multi-dimensional array and SUM the entries?
- Creating user relationships
- WP Northwind for Theme Development?
- Get Value from Column in Plugin Table [closed]
- Fastest way to get the comment and ping total count for a post
- The function can not create a table on MariaDB server
- $wpdb->replace: WHERE?
- Creating custom database table with crud operation
- How to use default WP form elements to interact with custom DB table?
- Your thoughts on the interaction with one custom database table from WP?
- dbDelta not creating tables with composite keys
- Applying WP-cli Search & Replace to Static SQL Dump File
- Saving contact form 7 data into custom Table
- How to make wordpress use a non-wordpress users table?
- Setup database structure with books, authors, languages etc. for publishing house [closed]
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- Add table to WordPress database
- Custom select query two tables by a meta key
- optimal taxonomy or custom post types
- WordPress search on a custom table
- Get All Results From Other Users That Share The Same Custom User Meta As Current User
- Migrating my site to a new domain does not keep any changes made in customizer
- New Page/Post Screen Opens an Existing Post
- Advice on how to structure a custom plugin
- How to have differents sites share the same tables of DB?
- Custom Form Input not saving to Database
- data retrieval presents last set of data
- Create single{custom}.php with data in table out of wp_posts
- Accountless password generation
- Add several fields from different tables to post, fields per post are in same row of table
- Where should I put this custom data?
- Show WP content on different PHP Sites
- Display single post inside accordion based on form submission results
- Changing starting number of User ID
- Accessing + retrieving custom database in WordPress
- Custom table or form
- How to get value from wp_usermeta table in database?
- When is it OK to create a custom table for a plugin? [duplicate]
- Advice how to connect custom database with WordPress, change data in WordPress and finaly use this data
- Changes to code not displaying
- How do register_sidebar() and get_sidebar() work together?
- Querying multiple WordPress custom fields with AND qualifier
- WordPress custom post types breaks permalink on theme reinstall
- Show attribute description when filtering by that attribute
- Create a Custom menu item fetched by Product Categories and Sub Categories
- Multi-Site Plugin Activated (Not Network-Activated), What Happens?
- Adding action to save_post, post needs to be saved twice for function to work
- 1 bit audio player
- Outputting posts from post id´s in variable
- Auto login after wordpress installation
- Determining What Content Gets Displayed
- Truncating varying lengths of information
- How to get pages id in array in get_pages?
- Access post meta in future_to_publish function
- Javascript Solution Remove Specific Tag but leave the rest in a specific DIV
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- custom meta box for page default template
- How to host 2 subdomains as lookalike destinations under one master domain?
- “An automated WordPress update has failed to complete – please attempt the update again now”– But there is no .maintenance file
- Custom Login Process
- How could I verify whole WP directory before/after working with a freelancer? [closed]
- Change options table prefix only
- Modify files without losing customization after updates
- Is it possible to make wordpress LMS
- Is it possible to rename a customizer control heading?
- How to add WordPress JS Script Links
- Show products per page drop down
- When developing WordPress plugin, is it a good idea to create my class object by hooking to existing class constructor?
- Static Page, need Last and Next links at the bottom
- Client viewing before deployment
- Change meta-box title- “LearnDash Quiz Settings” to “Quiz Settings”
- How to use a custom playlist template:
- Run a welcome tour after multisite creation?
- Multisite – Getting Meta query to select from wp_2 tables
- How to compare number with id of post in certain category
- WordPress Inline Style missing
- Need to over ride a !important from the index file
- Creating a search with tag variable also added for more detailed results
- Assign classes to Custom fields
- Custom WordPress SQL Query 4 posts per custom taxonomy
- Prevent posts from being published if the ‘Uncategorized’-category or no category is selected
- Has the table name in SQL for WordPress changed from WP_posts to WPCS_post?
- Multi color post title by using custom javascript inside the gutenberg editor?
- Add custom styles to the Raft theme