Answered
Hiding/viewing text when field null/not null
I found out how to only show a field in a query using
Dreamweaver 8, PHP, and MySQL when the field value is null by
viewing this:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=189&threadid=1005921&arctab=arc&highlight_key=y&keyword1=show%20region
However, how do I put text next to the field data when there is data in the field? So, 1) hide text and data when the value in the record field is null, and 2) show text and data when the record field is not null.
I tried to put the text in with the echo, but then the text was displayed without the field data when the field was null.
The code I have so far is:
<?php if (!is_null($row_rsProperties['US_List_Price'])){echo $row_rsProperties['US_List_Price'];} ?>
rsProperties is recordset and US_List_Price is the field
Thanks !
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=189&threadid=1005921&arctab=arc&highlight_key=y&keyword1=show%20region
However, how do I put text next to the field data when there is data in the field? So, 1) hide text and data when the value in the record field is null, and 2) show text and data when the record field is not null.
I tried to put the text in with the echo, but then the text was displayed without the field data when the field was null.
The code I have so far is:
<?php if (!is_null($row_rsProperties['US_List_Price'])){echo $row_rsProperties['US_List_Price'];} ?>
rsProperties is recordset and US_List_Price is the field
Thanks !