Trying to figure out a MySQL statement, and this is kind of a general query question so I am not using any set index...so bear with me. :)

Is there a way to combine these two queries.

```
SELECT * FROM tableName WHERE ID='123';
if (NUM_ROWS == 0) {
    INSERT INTO tableName (ID) VALUES (123)
}

```

Basically, I want to check if a certain entry exists and if it doesn't I want to create it. Figured I might be able to hit the DB once instead of twice.

The end goal is to create the row only if one doesn't exist first.

Thanks!