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
- I want to schedule email (date, time is in database->table) wp_schedule_event() not working
- Query Product categories what have a custom field
- Get /users/me details from WordPress backend
- mailchimp integration on a custom footer
- Can’t Customize WordPress Page
- ACF unable to use user field
- Bootstrap slider not working
- Use Theme CSS in custom code
- How to get the full product name by ignoring custom modification on it
- adding fade on mouseover to images
- where is admin footer?
- Customize section does not show my widget areas
- How can i add customisation of text to my theme?
- Add producthunt badge to wordpress menu
- Can I overwrite custom taxonomy FROM “public” TO “false”
- Show products per page drop down
- Trying to customise 2011 Child Theme Background Colour
- How to remove (…) from the post tilte on homepage?
- Is it possible to edit a wordpress category with Gutenberg?
- Widget recent comment filter by post meta_value
- Invitation link to a site in multisite network does not work?
- Swap home page based on user role, Elementor layout breaking
- Add helper text in custom-header section in admin
- How to edit content in code view of home page when there is some theme applied?
- How to display strikethrough text in button text (for special offer)
- Adding shortcode to product short description
- Display Custom Taxonomy Name As A Shortcode
- How to change Login default blue admin color?
- Remove Title and White Space in Twenty Twenty theme
- How do i remove this from logged in users?
- Schedule a subscription on gravity form, stripe add-on
- How to show related post with category DESC (ASC) IDs of ID current post
- Lost customization after switching the WordPress theme
- How to show Term ID beside Name Category with wp_dropdown_categories()
- Gender based user avatar
- Woocommerce custom “My Account” Tab – Add Save button
- How to create custom backend admin menu in different languages?
- WordPress Using Zip code customer shop find without woocommerce plugin
- Is MultiSite the Correct Solution for a Corporate Site with Searchable Regions?
- How can I style the Comment Section of a blog post
- New to WP: links on static homepage are not working
- Taxonomy template is not reading
- Custom Meta Box: Value saved in WordPress DB, but not shown in input field on Edit Screen
- Conflict between Yoast SEO and my custom theme