Author Topic: Database error when editing pages  (Read 6066 times)

Offline Floyd_61

  • New User
  • *
  • Posts: 8
    • View Profile
Database error when editing pages
« on: March 10, 2010, 03:30:37 AM »
Hi,

when editing the salespages I get a database error and the page is not saved.

This is what I get:
update sm_homepage set home_page='

', freedownload_form='
Testfiles ', count_date='0000-00-00 00:00:00', use_timer='0' where id='1' 1064
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 'imagesleads/backtop.gif') no-repeat;
width:600px; height:45px; margi' at line 1

What is the problem?

kiosk2

  • Guest
Re: Database error when editing pages
« Reply #1 on: March 10, 2010, 03:54:31 AM »
This is a problem with some hosts and versions of PHP/MySQL whereby you can't paste certain characters without putting a backslash before the offending character.

An apostrophe is the most common offender so for example if you were entering Fred's Shoes you would type Fred\'s Shoes.

Offline Floyd_61

  • New User
  • *
  • Posts: 8
    • View Profile
Re: Database error when editing pages
« Reply #2 on: March 10, 2010, 10:09:42 AM »
Thanks David.

This was a real quick response!

I deleted the homepage, and only write the word "test". Same error.
I have an old Turnkey script from Liz Tomey installed. It comes with the FCKeditor. Same error.

It refuses to save it in the database. If I put it directly via PHPMyAdmin into the database it runs well!!??

Can this be an HostGator issue??

Is there nobody with the same problem?

« Last Edit: March 10, 2010, 01:22:47 PM by Floyd_61 »

kiosk2

  • Guest
Re: Database error when editing pages
« Reply #3 on: March 10, 2010, 02:02:36 PM »
I'll install a copy on a Hostgator server and will have a look.

We managed to overcome it on SMP.

I'll let you know, although it may take a few days for me to do this.

David

Offline Floyd_61

  • New User
  • *
  • Posts: 8
    • View Profile
Re: Database error when editing pages
« Reply #4 on: March 11, 2010, 03:23:11 AM »
Hi David,

I spend another three hours to figure out the problem.
The code in "homepage.php" seems to be correct, so I think it is definately a problem
with storing a PHP textarea into a MySql database at HostGator.

It is very generous to support me with such an old script (it's V2.0).
As I mentioned in another post, I'm just starting with my business and
the budget is low.




Offline Floyd_61

  • New User
  • *
  • Posts: 8
    • View Profile
Re: Database error when editing pages
« Reply #5 on: March 11, 2010, 03:43:11 AM »
Hi David,

I have found a demo version of SM Pro (2.14) and installed it.
I edited a squeezepage and it is stored correctly in the table sm_squeezepage. GREAT!  ;D

So, if I earned some money I will purchase the Pro version. It seems to run on my host.