Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-16-2010, 04:46 PM #1
- Join Date
- Oct 2009
- Thanked 0 Times in 0 Posts
to check if Product_Description database field, is empty I must use what
<cfif Product_Description EQ ''>
Product Description:<cfoutput>#Product_Description#</cfoutput><br />
to check if Product_Description database field, is empty I must use what?
null , "" , '' ?
null exist in CFML?
Also upon image upload how get actual pixel dimesions WxH?
Last edited by lse; 09-16-2010 at 04:48 PM.
09-17-2010, 07:32 AM #2
- Join Date
- Feb 2009
- NJ, USA
- Thanked 70 Times in 69 Posts
Nulls don't exist in CF. You have to compare the value to an empty string, just like you're doing. You can use either two single quotes, or two double quotes, as they are interchangeable in CF.
To get pixel dimensions of an image, you can use the <cfimage> tag. However, you need to be using ColdFusion 8 or higher for it (as that was when the tag was introduced). Here is the doc for <cfimage> for Coldfusion 9: http://help.adobe.com/en_US/ColdFusi...2c24-7945.html
If you are using ColdFusion MX 6.1 or 7, then you can use a 3rd party CFC called imageCFC. It is available here: http://www.opensourcecf.com/imagecfc/. This may work on CF 6.0, but you should upgrade to 6.1 anyway if you're still using 6.0.
For a version of ColdFusion below MX 6.1 (CF5 or lower), then you'll need to install a custom C++ tag called cfx_image. It is available here: http://www.kolumbus.fi/jukka.manner/. (Don't install the "MX" version though, install the original one. The "MX" name started with CF6, and ended with CF7.) Note that this will only work if your server is on Windows, however.
There may be more extensions out there if you are using a version below CFMX 6.1, but these are just the ones that I know of from using them myself over the years as the versions progressed. Good luck.