Title: Simple IF statement question
Last modified: August 20, 2016

---

# Simple IF statement question

 *  [drudarby](https://wordpress.org/support/users/drudarby/)
 * (@drudarby)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/simple-if-statement-question/)
 * This is a very simple question for someone, I’m sure. But it has me stumped. 
   I’m sure if I played with it, I could hack it together to work – but I want to
   know if someone can help me with the correct way to do it.
 * I have one options page with two if statements. The first IF decides whether 
   or not to display a table with DB results. The second (should be) separate from
   the first, decides whether or not to display a SECOND table with DB results.
 * If there are results available for BOTH tables, then all is well.
    If there are
   results for table1, but none for table2, I get no tables. If there are results
   for table2, but none for table1, I get table2, and table1 shows up with no records
   instead of showing the “no records’ message.
 * Here’s my code if anyone has a second. Thanks!!
    [http://pastebin.com/R2pK1kdu](http://pastebin.com/R2pK1kdu)

The topic ‘Simple IF statement question’ is closed to new replies.

## Tags

 * [if statement](https://wordpress.org/support/topic-tag/if-statement/)
 * [plugin options](https://wordpress.org/support/topic-tag/plugin-options/)

 * 0 replies
 * 1 participant
 * Last reply from: [drudarby](https://wordpress.org/support/users/drudarby/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/simple-if-statement-question/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
