Sunday 15 May 2011

php - Make ID negative in a JOIN -


I have this query

  SELECT t1 *, T2. * Table 1 to t1 I want to consider "T.Id" (INT type) negative, so basically I just have to add "-" first. "320". I did not try with anything like this:  
  t2.id = 't1.' - 'id'   

How can I do this? / P>

Use a simple product:

  t2.id = - 1 * T1.id '   

No comments:

Post a Comment