MySQL Field Type Plugin

12 years 3 weeks ago #192888 by softforge
Replied by softforge on topic Re: MySQL Field Type Plugin
Yes, you can ignore that message as the plugin does not create a database entry which isn't a problem.

I will look into a way of suppressing that message in the next release.

If you like our plugins, please consider writing a review on the Joomla Extension Directory or the Community Builder Directory ...
The following user(s) said Thank You: blackforce

Please Log in to join the conversation.

12 years 3 weeks ago - 12 years 3 weeks ago #193535 by 3cellhosting
Replied by 3cellhosting on topic Re: MySQL Field Type Plugin
OK - I am stuck again :blush:

The following query runs fine in Navicat but I am struggling to make it work in MySQL field.

SELECT
CASE rms_schedule.shifttype WHEN 1 THEN "Day" ELSE "Night" END AS "Shift",
rms_schedule.datestart AS "Start Date",
rms_schedule.datefinish AS "End Date",
rms_schedule.notes AS "Notes",
rms_clients.client_name AS "Client",
rms_stores.address AS "Address",
rms_stores.town AS "Town",
rms_stores.county AS "County",
rms_stores.postcode AS "Postcode",
rms_stores.tel_no AS "Telephone"
FROM
rms_schedule
LEFT JOIN rms_stores
ON rms_schedule.record_id = rms_stores.record_id
LEFT JOIN rms_clients
ON rms_stores.client_id = rms_clients.client_id
WHERE user_id = 44 AND datestart >= CURDATE()

I have tried removing AS "Xxxxxx" and leaving just the fields - no output.

I also tried removing the LEFT JOIN's from the query - no output.

Navicat runs the query and displays the single record that currently matches the query when I change {USERID} for the actual number e.g. 44

Also tried the variants from {USERID} to {VIEWERID} access to all, User, Viewer. Set Limit 0,10 removed limit entirely but cannot get this to work.

Any ideas where I am going wrong?

David
www.3cellhosting.com - where personality, creativity and integrity come as standard.

Please Log in to join the conversation.

11 years 11 months ago #198091 by BoredLand
Replied by BoredLand on topic Re: MySQL Field Type Plugin
Hey,

i successfully use the plugin, but experience a problem:
I'm actually calling out data from mysql, which i want to get used as language variables - for some reason the arend transformed to the variable definition in my cb-languagefile and stays exacly the readout from mysql-db.
perhaps anyone's got an idea?

Yours,
Bored

Please Log in to join the conversation.

11 years 11 months ago #198362 by softforge
Replied by softforge on topic Re: MySQL Field Type Plugin
Hey, unfortunately the plugin does not take into account the language file. I'm not sure how easy it would be to modify the plugin to do this, maybe it would be easy if there is an function in the CB API. I will look into this for the next version.

If you like our plugins, please consider writing a review on the Joomla Extension Directory or the Community Builder Directory ...

Please Log in to join the conversation.

11 years 8 months ago - 11 years 8 months ago #204637 by toddfletcher
Replied by toddfletcher on topic Re: MySQL Field Type Plugin
I need to be able to check if the current user has any active subscription. I have put in

SELECT *
FROM #__cbsubs_subscriptions
user_id = {USERID} AND status = 'A'

This gets dumped into cd_subscriber.

I view this field in the profile on the front end but it only it displays '-'.

Perhaps I am doing something wrong or maybe there is a better way to accomplish this. I am upgrading my video subscription site and would like to have the ability to check if the user has an active subscription so I can either play a video for 5 mins and then stop or let it play. I kind of paywall. Preview a few minutes and then stop and offer a link to subscribe. I can handle everything else except for checking is the user does in fact have an active subscription. I only offer two types and those are only difference based on time frame. So any return from the query should flag that the user does have an active sub. THANKS in advance! B)

Please Log in to join the conversation.

11 years 8 months ago - 11 years 8 months ago #204638 by pepperstreet
Replied by pepperstreet on topic Re: MySQL Field Type Plugin

toddfletcher wrote: I need to be able to check if the current user has any active subscription. ...
Perhaps I am doing something wrong or maybe there is a better way to accomplish this. ...


You can try CBsubs -> YourPlan -> Integrations -> CB Fields
This integration can change any field on plan activation and deactivation.

BTW, there is also the Plan-Image feature, which you can see in action under your forum avatar. If you need a visual control it might serve the purpose... but its a calculated value. AFAIK, you can't check its value. I assume, you are after a value you can use elsewhere? Then I would prefer CBfields integration.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.291 seconds

Facebook Twitter LinkedIn