This topic is locked

Error on Remind Password - Unknown column '' in 'WHERE'

7/4/2025 9:16:22 PM
PHPRunner General questions
H
headingwest author

Hi,

Any ideas on fixing this? My remind password page is crashing. V11.0 Build 43540

Error type 256
Error description Unknown column '' in 'WHERE'
URL leadlst.com/remind.php?
Error file /home/1365906.cloudwaysapps.com/hatcfurgrf/public_html/connections/Connection.php
Error line 664
SQL query SELECT ID, username, password, email, fullname, groupid, active, ext_security_id, reset_token, reset_date, orgid FROM mpzleads_users WHERE ( ( ( upper(email) = upper('rrdd') ) or ( upper(``) = upper('rrdd') ) ) ) limit 0, 1

img alt

Thanks.

ChatGPT 7/4/2025

It looks like you're encountering an SQL error related to an empty column name in the WHERE clause of your query. The specific error message indicates that there is an unknown column '', which means that somewhere in your query, an empty string is being used as a column name.

Here's a breakdown of the problematic SQL query:

SELECT `ID`, `username`, `password`, `email`, `fullname`, `groupid`, `active`, `ext_security_id`, `reset_token`, `reset_date`, `orgid` 
FROM `mpzleads_users`
WHERE ( ( ( upper(email) = upper('rrdd') ) or ( upper(``) = upper('rrdd') ) ) )
LIMIT 0, 1

Possible Solutions:

  1. Check the Code for Empty Column Name: The part of the query upper('') suggests that somewhere in your code, an empty column name is being used. You should check the logic that constructs this SQL query, particularly where you are building the WHERE clause. Look for any code that might be trying to use a variable or field that hasn't been properly defined or is empty.


  2. Remove or Fix the Condition: If the intention is not to include that empty column condition, you should remove it from the SQL query. The corrected version should only check the email column:

     WHERE (upper(email) = upper('rrdd'))
  3. Debugging Output: You can add some debugging output to see what variables are being used to construct your SQL query. This will help you identify where the empty column name is coming from.


  4. Check User Input: If the email is coming from user input, ensure that it is being correctly validated and sanitized before being used in the SQL query. This can help prevent SQL injection attacks and also ensure that the input is properly formatted.


  5. Consult PHPRunner Documentation: If you're unable to find the issue, you might want to check the PHPRunner documentation or community forums for similar issues related to the remind password functionality.



By following these steps, you should be able to identify and fix the cause of the error on your remind password page. If you need further assistance, feel free to provide more context or code snippets.

C
Chris Whitehead 7/5/2025

I know chatGPT has answered, but it looks like the error is the empty string "upper(``)" in the where condition, this needs to be a column name and can't be empty.

WHERE ( ( ( upper(email) = upper('rrdd') ) or ( upper(``) = upper('rrdd') ) ) ) limit 0, 1

Should this be?

WHERE ( ( ( upper(email) = upper('rrdd') ) or ( 'rrdd' = '' ) ) ) limit 0, 1
H
headingwest author 7/5/2025

Hi Chris,

This is the system generated remind password page, the SQL is outside my control.

C
Chris Whitehead 7/6/2025

Could be a bug in V11, I'd try these steps just in case it's not.

With the password and email both being converted to upper, do you have the case-insensitive login selected? do you still get the error if this is turned off?

In designer create a copy of the password reminder page and make that the default.