CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Broken SQL update

Print topic Send  topic

Author Message
songohan

Posts: 89
Posted: 10/21/2008, 1:29 AM

Hi!

Well, first, it is quite urgent :)

Second. I have quite simple record form for inserting and updating content for CMS. Problem seems to be only when updating content.

I have one textarea and TinyMce attached to it. Clients paste text from word, but directly (impossible to convince them to use "paste from word" button). Something in text breaks SQL update. Somewhere near WHERE and than all records in content table get overwritten with single same record. Well, must tell you clients are not happy.

I found that combination of word "where" and than two spaces and linebreak break the SQL. When I check html of this entry you have "where  <br />".

If you take problematic text, paste it to notepad and back to editor all is ok.

Any ideas how to prevent this, please? I'm sick and tired of restoring database for them.

Best regards,

Andrej
View profile  Send private message
Gena

Posts: 591
Posted: 10/21/2008, 1:38 AM

check if property of your textarea field has set Data type as Memo. This should transform your html content in SQL safety form...
_________________
Gena
View profile  Send private message
songohan

Posts: 89
Posted: 10/21/2008, 1:44 AM

Quote Gena:
check if property of your textarea field has set Data type as Memo. This should transform your html content in SQL safety form...

Thnx! Further test show that pasting from Word might not be problem. Any ocurance of word WHERE causes SQL to break and after refresh, after word where piece of SQL gets into text... something like: "where" gets replaced with "where menu_id=32" and than text goes on normally. But also all records in that table were updated... I'm not with my project at a moment but will check Data types when I get home.
View profile  Send private message
songohan

Posts: 89
Posted: 10/23/2008, 2:35 PM

I switched to CCS 4.04 (was this necessary I have no idea), deleted all generated files ad regenerated project and problem is gone.

A.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.