473,383 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

WordPress database error: help ?

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 1]
SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2011-04-13 08:52:59' AND (post_status = "publish") GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT -10, 10


can anyone help me with this error ?
Apr 13 '11 #1
8 2303
code green
1,726 Expert 1GB
The LIMIT -10, 10 looks wrong.
You are asking to start at row -10.
What are you trying to do?
Apr 14 '11 #2
i ran a sql injection scan on my site and thats the result, is it a venerability ?
Apr 14 '11 #3
JKing
1,206 Expert 1GB
The scan told you there was a mysql error?

Is the error suppressed? Or is it printed to the page when the user navigates to the page in question?

If the error is being printed it could be a vulnerability by giving away details that would otherwise not be shown.
Apr 14 '11 #4
yeah the error is being printed so do i fix this
Apr 14 '11 #5
JKing
1,206 Expert 1GB
Try this... I think the intent is to pull only 10 records.
Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2011-04-13 08:52:59' AND (post_status = "publish") GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 10
  2.  
Apr 14 '11 #6
thats what gets printed on the site

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 1]
SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2011-04-13 08:52:59' AND (post_status = "publish") GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT -10, 10
Apr 14 '11 #7
this is the sql injection string that was used

index.php?paged=/archive/-1-5-2-Create Table

it was used at the end of a url
Apr 14 '11 #8
and this to
index.php?paged=-25633&header.php?=-id
Apr 14 '11 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Dave | last post by:
I am getting an intermittent database error on my asp page. I am using Access 2003 with classic ASP. The error is this: Microsoft JET Database Engine Error 80040e10 No value given for one or...
0
by: mmakundi | last post by:
Database Error Io exception: The Network Adapter could not establish the connection: I have installed the oracle database on windows XP sp2 succeesfully for the first time and when I try to...
2
by: bulletz | last post by:
There is NO help on the support forums over there! UGh ... so this is the issue I can't import this one piece of my database because of an error: SQL query: # # Data contents of table...
2
by: fifko | last post by:
Hello everybody, I realize that this is most probably the best place to post this, but I just need some explanation from someone, who at least knows what's the following about... It's bugging me...
1
by: soidariti | last post by:
database error - parse error, unexpected $, expecting kEND AddUserAuthorisationToUsers.rb migration file 1. class AddUserAuthorisationToUsers < ActiveRecord::Migration 2. def self.up ...
6
by: Martin Neumann | last post by:
Hi there - I'm a fairly newbie in regards with MySQL but I have encountered a problem and I'm not sure where to go with it. I'm transferring my WP blogs over to a new host and I've so far...
4
by: sleepy1038 | last post by:
Hello, I'm developing a site that makes use of wordpress. The homepage is outside of wordpress and I am pulling the latest 3 blog posts from the wordpress database to display on the homepage....
1
by: manjava | last post by:
Hello, i want to create a pluging for wordpress to import the data from file csv in the data base of wordpress if any one know this plugin please tell me is very urgent Thanks
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.