• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 353
  • Last Modified:

create a repeat region that ignores records where name field is empty in PHP

Just a quick question I'm stuck on.

I would like to create a repeat region that will only display records that contain a name in the name field of the 'comments' table.

If the name field is empty, I want the record to be excluded from the repeat region.

Any help would be appreciated.

Thanks.
0
SaigonJeff
Asked:
SaigonJeff
  • 2
2 Solutions
 
stergiumCommented:
something like this ?
if ($row['comments']!=""){
echo "<tr><td>".$row[name] ......";
}
0
 
stergiumCommented:
or a  better comparisson in case you want to show comments that are larger than x chars
if (strlen($row[comments])>x chars ){
.....
}
0
 
liveaspankajCommented:
please post the code here.
0
 
SaigonJeffAuthor Commented:
I have found a free extension which seems to do the job.

It is a simulated nested region extension by Tom Muck
http://www.tom-muck.com/extensions/help/simulatednestedregion/

It works well .

Thank for everyone's assistance

In fairness, I have awarded points to both solutions offered.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now