My SQL Syntax Error.

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
svankamon
-


Joined: 01 Apr 2007
Posts: 148
Location: Chesterfield UK

PostPosted: Sun Jun 17, 2007 5:14 am    Post subject: My SQL Syntax Error. Reply with quote

Hi People.

Sorry i know i shouldnt probably post this here, but i tried on another forum where i attained a script and ive been waiting for replies but none come. So o thought id try here. These guys here seem to know what theyre doing and above that. They Get Things Done. Anyway to the problem.

I have a script that autoreports. Unless its MySql that autoreports. Anyway I got an auto report from MY PC sent by email This is it. It apparantly shows errors in either my database or my script. Dont know which. Line Number seems to point to script.??? This is the report sent to me. Does anyone know how to correct the error. Id be most grateful. Cheers Again. This is it.
Databse Error In: (My Website)?


Script note: Database query error
Query:
SELECT
Profiles.ID,
Profiles.Headline,
Profiles.Country,
Profiles.Occupation,
Profiles.City,
Profiles.CENSORED,
Profiles.NickName,
Profiles.Children,
Profiles.MerchantPrice,
LEFT( Profiles.DescriptionMe, 180 ) AS DescriptionMe,
LEFT( Profiles.DescriptionYou, 100 ) AS DescriptionYou,
Profiles.DateOfBirth,
Profiles.Pic_0_addon,
Profiles.Sound,
Profiles.ProfileType,
Profiles.CENSORED,
Profiles.DateOfBirth2
FROM `Profiles`
INNER JOIN `Tags`
ON ( `profile` = `ID` )
WHERE
`tag` = 'software' AND
`Status` = 'Active'
LIMIT -4, 4

Mysql 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 '-4, 4' at line 25
Debug backtrace:

Array

--
Auto-report system

Now ive been to the MySQL site. And If i can understand any of that HUGE ARRAY Of text id be blown.


I copied the text into query window and pressed go and this was the responce:

#1064 Mysql 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 '-4, 4' at line 25

HELP IF YOU CAN. Sorry for posting it here. Thius is the land of the living.

Thanks.
Back to top View user's profile Send private message Send e-mail
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Jun 17, 2007 6:28 am    Post subject: Reply with quote

I don't believe the LIMIT statement allows a negative number, or maybe you're missing the semicolon at the end of the Query.
Back to top View user's profile Send private message Visit poster's website
svankamon
-


Joined: 01 Apr 2007
Posts: 148
Location: Chesterfield UK

PostPosted: Sun Jun 17, 2007 7:37 am    Post subject: Reply with quote

Thanks a lot abyss. I reloaded the script but havent created a user yet. Il try that tomorrow then run it a little to see if it does it again.

It may do its a new script just being tested. a beta version. Il keep them crossed.???

Cheers again.
Back to top View user's profile Send private message Send e-mail
svankamon
-


Joined: 01 Apr 2007
Posts: 148
Location: Chesterfield UK

PostPosted: Sun Jun 17, 2007 7:38 am    Post subject: Reply with quote

Oh by the way. do you know if it i install mysql5 then copy my database files to the data folder. Will they still work with the scripts.???? Or will i have to start again. CHEERS.
Back to top View user's profile Send private message Send e-mail
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Jun 17, 2007 11:11 pm    Post subject: Reply with quote

I believe they should still work as long as you have all the database files for the database required for your script.
Back to top View user's profile Send private message Visit poster's website
svankamon
-


Joined: 01 Apr 2007
Posts: 148
Location: Chesterfield UK

PostPosted: Mon Jun 18, 2007 2:22 am    Post subject: Reply with quote

Thanks a lot abyss underground.

I was a little afraid of loading v5 in the first place. Im researching complete disc image back up software at present. I dont have a lot to spare so have to try them etc.

You could answer another query if you could. And that is can i backup my hard disks safely with something like Paragon V10 Home. I mean would a complete disk image backup software backup all my settings and abyss related sites etc. I ask this knowing the answer seems obvious but Paragon also do a server version. This is vastly more expencive Something like £700 or $ However the server version is available at only $9.95 on a site i visited. I know you get your rip off merchants but for that money would it be worth the risk. Id have to make sure my account was empty i supose those to avoid them ripping me off.??? Dont know wether they can.?

Decisions decisions.

Thanks again abyss underground for the advise. Its much apreciated. Hope your well and all you know.

Thanks.
Back to top View user's profile Send private message Send e-mail
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Jun 18, 2007 3:58 am    Post subject: Reply with quote

My nick is TRUSTAbyss. :-)

AbyssUnderground would probably be able to help you with the backup stuff.
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group