Click here to Skip to main content
15,936,546 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
My system was working fine, but now i have this problem

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND user_email = ''' at line 1]
SELECT * FROM wp_users WHERE ID = AND user_email = ''

Richard, a member, told me!!
as you can see, you are missing a parameter value after "ID = " in your SQL statement.

But where can i find thids ID?

Hope someone can help!

What I have tried:

I put all my plugins on and off to see if there is a confict, but that did not work
Richard MacCutchan 18-Dec-23 10:59am    
I told you wahat is wrong. Your SQL says:
SELECT * FROM wp_users WHERE ID = AND user_email = ''

But you have not provide the ID value after the equals sign, so the database server has no idea how to find the record you are interested in.
Henk1964 18-Dec-23 11:07am    
Hello Richard, thanks for responding. Some build this website for me, years ago. I dont have any contact with him anymore. This system he build is for tuningfile. a customer can upload his original file. That part is working well. In my email i get a message. And his file. In that message there is a upload link, and that is not working anymore. Now you know whaT MY PROBLEM IS. i CANT FIX IT, I AM NOT A EXPERT. hOPE YOU CAN HELP ME> rEGARDS hENK
Richard MacCutchan 18-Dec-23 12:35pm    
Sorry, the fix to the SQL is quite straightforward, and if you have not recently changed something in the code, I do not see how that could ever work. I am afraid you will need to find a developer to help you, as they will need to see all the code.

1 solution

Uhh, how would we know? It's your code and you put the ID condition in the WHERE clause for some reason. You are the only person who knows that reason.

Let me guess. You copied and pasted code from the web into your WordPress site without having a single clue what it's doing or why?
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900