SUBSTRING () / MID () Statement in Zend Framework 2

I am trying to implement the following, rather simple query:

WHERE
  a.first_table IS NULL
  AND a.second_table IS NOT NULL
  AND SUBSTRING(b.third_table,5,2) = @plan_year;

      

As you might have guessed, the first two statements are not really a problem. I am not currently executing SUBSTRING () through Zend as I want to keep the DB-System code neutral. Is there a way to do this?

thank

+3


source to share


1 answer


How do I use SUBSTR instead SUBSTRING

?



WHERE
  a.first_table IS NULL
  AND a.second_table IS NOT NULL
  AND SUBSTR(b.third_table,5,2) = @plan_year;

      

+1


source







All Articles