Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

IF THEN Capabilities
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: IF THEN Capabilities
#20003
Re:IF THEN Capabilities 12 Years, 6 Months ago Karma: 0
I was hoping to show V# in one column, justified right, and then the A# in the next column justified left.

Thanks,

Gorden
The administrator has disabled public write access.
 
#20004
Re:IF THEN Capabilities 12 Years, 6 Months ago Karma: 746
Could you specify what problem you have with the next SQL query?

Code:


SELECT
OUI.factory, 
OI.part, 
OUI.factory2, 
OUI.series, 
OUI.power, 
OUI.convection, 
OUI.type, 
CONCAT(
   IF(LENGTH(IFNULL(OI.V1, '')) > 0, CONCAT(OI.V1, '<br/>'), ''),
   IF(LENGTH(IFNULL(OI.V2, '')) > 0, CONCAT(OI.V2, '<br/>'), ''),
   IF(LENGTH(IFNULL(OI.V3, '')) > 0, CONCAT(OI.V3, '<br/>'), ''),
   IF(LENGTH(IFNULL(OI.V4, '')) > 0, CONCAT(OI.V4, '<br/>'), '')
 ) AS V,
CONCAT(
   IF(LENGTH(IFNULL(OI.A1, '')) > 0, CONCAT(OI.A1, '<br/>'), ''),
   IF(LENGTH(IFNULL(OI.A2, '')) > 0, CONCAT(OI.A2, '<br/>'), ''),
   IF(LENGTH(IFNULL(OI.A3, '')) > 0, CONCAT(OI.A3, '<br/>'), ''),
   IF(LENGTH(IFNULL(OI.A4, '')) > 0, CONCAT(OI.A4, '<br/>'), '')
 ) AS A,
OI.Efficiency, 
OUI.dimensions
FROM
jos_part OI INNER JOIN jos_series OUI 
ON OI.series = OUI.series
WHERE 
OI.V2 > 0 
AND 
OUI.type = 'Open Frame' 
AND 
OUI.safety = ''



Regards,
ARI Soft
The administrator has disabled public write access.
 
#20005
Re:IF THEN Capabilities 12 Years, 6 Months ago Karma: 0
I have created separate tables for single output models (V1 has a vaue, V2, V3, V4 do not) So I am now trying to make a table to display multi output models, this table will always have a V1 and V2 value, as well as their mating A1 & A2 value.

So in reality, I only need this display / don't display function for V3 & V4 / A3 & A4. My intent is to display V#'s in one column, and A#'s in another column.

V# Values are followed by a V if they exist, A# Values are followed by an A if they exist.

Please provide an example using the code I started with, when I tried to implement with the syntax you provided, i could not get it to work.

Thank you,

Gorden
The administrator has disabled public write access.
 
#20009
Re:IF THEN Capabilities 12 Years, 6 Months ago Karma: 0
To insert the V and A Values, this is the syntax I ended up using and it works perfectly.


SELECT
OUI.factory,
OI.part,
OUI.factory2,
OUI.series,
OUI.power,
OUI.convection,
OUI.type,
CONCAT(
IF(LENGTH(IFNULL(OI.V1, '')) > 0, CONCAT(OI.V1, 'V <br/>'), ''),
IF(LENGTH(IFNULL(OI.V2, '')) > 0, CONCAT(OI.V2, 'V <br/>'), ''),
IF(LENGTH(IFNULL(OI.V3, '')) > 0, CONCAT(OI.V3, 'V <br/>'), ''),
IF(LENGTH(IFNULL(OI.V4, '')) > 0, CONCAT(OI.V4, 'V'), '')
) AS V,
CONCAT(
IF(LENGTH(IFNULL(OI.A1, '')) > 0, CONCAT(OI.A1, 'A <br/>'), ''),
IF(LENGTH(IFNULL(OI.A2, '')) > 0, CONCAT(OI.A2, 'A <br/>'), ''),
IF(LENGTH(IFNULL(OI.A3, '')) > 0, CONCAT(OI.A3, 'A <br/>'), ''),
IF(LENGTH(IFNULL(OI.A4, '')) > 0, CONCAT(OI.A4, ' A'), '')
) AS A,
OI.Efficiency,
OUI.dimensions
FROM
jos_part OI INNER JOIN jos_series OUI
ON OI.series = OUI.series
WHERE
OI.V2 > 0
AND
OUI.type = 'Open Frame'
AND
OUI.safety = ''



Thanks for all the help, I highly recommend this module and your support.

Gorden
The administrator has disabled public write access.
 
Go to topPage: 12