mysql - SQL ID not in the table -


so i'm looking solution check if "id" in sql.

select id t_data partnerid=12 

the id logged in user.

<?php echo $id ?> 

so works fine if there entries right id in table. if there no row id error. possible set if id not in row nothing?

use following:

  select ifnull(id,'') t_data partnerid=12 

or can use

select if(id not null, id ,'')  t_data partnerid=12 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -