188 Posts
uriel
8 years ago
7
Topic

My idea is simple. Use 42 to

give update on another table.

Where is the error?

Get a Book for SEBLOD
188 Posts
uriel
8 years ago
1
Level 1

Not saved in the table

8 years ago
0
Level 2

You have an error in PHP. Put your code to file and debug it before blame the field. Assume that field works, it is easier.

4229 Posts
Kadministrator
8 years ago
0
Level 1

As any other field also 42 should trigger an error if something is wrong, you should enable error reporting in joomla.

188 Posts
uriel
8 years ago
2
Level 1

Thank you. 

Show code because I can not see the error.

What do I need to change that code to do what logic says.

8 years ago
1
Level 2

Next time show your code like a text, we're too lazy to retype it from screenshot :)

As I see on this little screenshot you have a such string:

$sql = "UPDATE `#__cck_store_form_texto` SET fcont=".$fcont."where id=".$live.";

It's not correct, you haven't concat last qoute. Correct string have to be:

$sql = "UPDATE `#__cck_store_form_texto` SET fcont='".$fcont."' where id=".$live;

Really, you don't need to break qoutes. Double qoutes allow it:

$sql = "UPDATE `#__cck_store_form_texto` SET fcont='$fcont' where id=$live";
4229 Posts
Kadministrator
8 years ago
0
Level 3

Good catch!
I would only add to this that everyone should be using Joomla query API (and not construct queries as strings), which mostly solves such problems by itself

https://docs.joomla.org/Inserting,_Updating_and_Removing_data_using_JDatabase

188 Posts
uriel
Get a Book for SEBLOD