Skip to Content Skip to Menu

MySQL Field Type Plugin

  • razzo
  • razzo
  • OFFLINE
  • Posts: 1
  • Thanks: 1
  • Karma: 0
10 years 9 months ago #240291 by razzo
Replied by razzo on topic MySQL Field Type Plugin
Little problem with J3.x


I solve changing the line 95 in cb.mysqlfield.php in this way:
Code:
//$_CB_database->setQuery(str_replace("{USERID}", $user->id, str_replace("{VIEWERID}", $viewer->id, $query))); if ($viewer->id != null) { $query = str_replace("{VIEWERID}", $viewer->id, $query); } else { $query = str_replace("{VIEWERID}", "0", $query); } if ($user->id != null) { $query = str_replace("{USERID}", $user->id, $query); } else { $query = str_replace("{USERID}", "0", $query); } $_CB_database->setQuery($query);
The following user(s) said Thank You: cardoso69

Please Log in or Create an account to join the conversation.

10 years 9 months ago #240296 by pepperstreet
Replied by pepperstreet on topic MySQL Field Type Plugin

razzo wrote: Little problem with J3.x
...


Would you mind to tell us the actual problem in more detail, please? What was the issue in what situation. Thanks in advance.

Please Log in or Create an account to join the conversation.

  • FilMarX
  • FilMarX
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
10 years 6 months ago #244677 by FilMarX
Replied by FilMarX on topic MySQL Field Type Plugin
Very nice plugin.

The only problem I have, it shows only the values when you view the profile.
When you want to edit the profile, you don't see the values any more.

Is there a way to overcome that?

Many thanks in advance,

Please Log in or Create an account to join the conversation.

  • cardoso69
  • cardoso69
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
  • Add-ons
9 years 10 months ago #256102 by cardoso69
Replied by cardoso69 on topic MySQL Field Type Plugin
I think I've found what razzo wants to say.
When we try to use the plugin in the new J!3.0 version and with the CB 2.0/2.3, and if we want to create some CB Lists, the the following error is displayed, when i use this query:

"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 '' at line 1 SQL=SELECT CONCAT (lastname, ', ', firstname) AS mysqlfield FROM c629i_comprofiler WHERE id = {USERID}"

In my case, after some debugging i found that the problem comes when we use the variable {USERID}, so after I've changed the code in line 59 (not in line 95 as razzo said, maybe a mistyping) the list is working again.

It looks like the plugin need some changes to be fully compatible with CB 2.0 and J!3.

Please Log in or Create an account to join the conversation.

  • gtrennert
  • gtrennert
  • OFFLINE
  • Posts: 128
  • Thanks: 4
  • Karma: 0
9 years 6 months ago #263932 by gtrennert
Replied by gtrennert on topic MySQL Field Type Plugin
I have a little problem with the plugin :
My users have to make inscription : they give their birthday (required) and some mysql fields should store some values depending of the birthday in some cb custom fields
After inscription the user gets a mail to validate the inscription and when he did this the administrator will approve.
Once approved I hoped that the mysql fields have calculated the values but this is not the case - the user must go edit his profil and once saved the right values are calculated.
Can anyone tell me if there is a way to make the calculation work at latest when approoving the user ?

Thanks :)

Please Log in or Create an account to join the conversation.

  • gtrennert
  • gtrennert
  • OFFLINE
  • Posts: 128
  • Thanks: 4
  • Karma: 0
9 years 6 months ago #264385 by gtrennert
Replied by gtrennert on topic MySQL Field Type Plugin
To be more clear what happens :
After approving if any user goes to the profile of the new user for the first time the custom fields are not calculated - then if he reloads (F5) then the custom fields are finally calculated.
Why is that that the same page the first time does not work in the same way as the second time !!!???
I have to look for a solution - perhaps by adding some php.
Any hint would be welcome !

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum