mercredi 1 juin 2016

Mysql select with example

Hi consider this table,

Table Procedures

name creation_date author title status

  1. Procedure1 2016-04-01 coco title1 deployed

  2. Procedure2 2015-02-01 jojo title2 in_creation

  3. Procedure3 2016-07-22 lolo title3 validated
  4. Procedure4 2013-04-01 toto title created

What I want to do is select all procedures where status different then in_creation but when the connected user is the author show it. For instance in the example above if the connected user is jojo I will show all procedures, if not I will only show Procedure1,Procedure3 and Procedure4 . How can I achieve that with a query ?




Aucun commentaire:

Enregistrer un commentaire