Apparently both wattp_users and wattp2_as_score tables have a column named score_as.
Put a prefix with the table name before every mention to score_as column, just as you did with the ID (e.g. wattp2_users.ID) to avoid beeing ambiguous.
Related Posts:
- Transaction when using WP functions rather than vanilla SQL?
- How to get the list of WooCommerce product image of a certain category from database?
- How to make WordPress plugin check for database changes and then do something?
- How to Join two tables from separate databases within WordPress
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- register_activation_hook isn’t adding table to DB
- What SQL / WordPress queries would need a nonce?
- Importing Geo data into wordpress database
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- $wpdb->insert() does not Insert record in a table
- Use $wpdb or other PHP script method to find/replace in WP database
- How can I add a new row in a separate database when someone registers via WordPress?
- Use variable in SQL statement
- mySQL queries are executed twice on wordpress website
- making php value numeric
- Database SQL query error
- How to run complex query using PHP
- Inserting other fields to existing registration form in a WordPress theme
- SQL Query Search page
- can’t delete a row from post_meta table
- Conditional statement within WP SQL query
- Undefined function mysql_connect()
- MySQL “Or” Condition
- SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax — PHP — PDO [duplicate]
- How to auto login user again after change user_login
- Jquery ajax to custom php file: returning blank data
- Add value to usermeta without removing previous values?
- How can I call a row of user specific data from a custom table added to the WP Database
- How to merge local and live databases?
- Performance issues with large website [closed]
- Create a quick start wordpress installation [closed]
- theme options echoing multiple times
- WordPress 3 – how are passwords stored and how do I compare to them?
- how to echo all tables that start with a prefix
- How to select WooCommerce products by post_meta and order them
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- Remove one value in dismissed_wp_pointers?
- Transferring working local PHP site to wordpress – with database (MySQL)
- Accessing data from a non-WP database/table within a page content
- Detect session/cookie variable in wordpress to prevent access to documents
- How can I save unique user data on my site? [closed]
- Ordering users by custom user meta
- Databases – Submitting data from inputs to database [closed]
- WordPress SQL injection
- multiple where condition in result query
- Grouping posts by a custom meta value
- Is it best to avoid using $wpdb for security issues?
- Should I use WordPress to skin a database website?
- WordPress Custom SQL Table with UserID Filter for results
- Correct PHP to output a single result of a Function with SQL Query
- I can’t update my data through $wpdb
- Output: “Array”
- How to use mysql LIKE with wpdb?
- Filter results from a serialized string to use on statistics
- Searching Posts Programmatically in a WordPress Plugin
- Using wordpress function to retrieve data
- Live search from database table
- Why my query does not run with prepare
- wpdb getting avatars and author url
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- WordPress SQL JOIN query
- How to create Loop code for Menu using WordPress?
- How to WP_Query posts order by parent title?
- Convert a column of a table containing an Array as response in HTML
- get different meta-data of a complicated query at the same time
- Please help! I have a problem with getting wordpress databas
- Build A Custom SQL Query for WordPress Search
- Error establishing a database connection (Set-up locally)
- Storing huge number of users in wordpress
- Trying to create a shortcode to display categories with a specific product tag
- Creating multiple tables with Plugin
- Custom User registration system
- Can I split a huge wp_postmeta table across different databases or servers?
- how to get data from two different table from wordpress database
- Passing Current User ID into SQL statement
- How to insert multiple rows and columns in database using array
- Woocommerce – get daily sales meta
- WordPress search query, how to modify the sql
- Error inserting into custom table – Object of class wpdb could not be converted to string [closed]
- Windows Setup: Error establishing a database connection
- The plugin generated 225 characters of unexpected output during activation
- WAMP SERVER Command Prompt SET PATH=%PATH%
- WordPress select query issue
- How can get all users by current user meta (array)?
- What to create new post using wp_insert_post, but it repeat the post infinitely
- Send data from plugin to external database
- Processing forms with php to wordpress database
- How to connect database table to each registered wordpress user.
- See output of a sql query while plugin installation in wordpress
- Using the same shortcode to show any table from the database
- Querying multiple meta_keys in WordPress SQL query
- Cannot Upload Custom Header Image into WordPress Dashboard
- Predefine Magazine Style Layouts
- I am unable to fetch json data from wp_db
- How to send push notification in android using php? [closed]
- How to set variable to specific field when querying
- Search results always returns “No results” no matter what
- Getting invalid user ID error when creating a new user with wp_insert_user
- Custom form that stores data in mysql database
- Retrieve data from external database and insert back in