title: Select data with IF condition and IF data not found then insert data with last inserted data + 1
body: <pre><code>1.Select data from table
  2.If data not found then insert data into that table with last record data using + 1
  Table name = demo
  Query = Select * from demo where user_id = test4 if not then insert into demo values ('test4','port1+1','port2+1','port3+1','port4+1');
  </code></pre>
  <p>Example :</p>
  <pre><code>+----+--------------------------------+------------+----------+-----------+---------+
  | id | user_id                        | port1     | port2  | port3  | port4 |
  +----+--------------------------------+------------+----------+-----------+---------+
  |  1 | test1                          | 27        | 72     | 58     | 65   |
  +----+--------------------------------+------------+----------+-----------+---------+
  </code></pre>
  <p>I need output like this:</p>
  <pre><code>+----+--------------------------------+------------+----------+-----------+---------+
  | id | user_id                        | port1     | port2  | port3  | port4 |
  +----+--------------------------------+------------+----------+-----------+---------+
  |  1 | test1                          | 27        | 72     | 58     | 65   |
  +----+--------------------------------+------------+----------+-----------+---------+
  |  2 | test4                          | 28        | 73     | 59     | 66   |
  +----+--------------------------------+------------+----------+-----------+---------+
  </code></pre>