NYCPHP Meetup

NYPHP.org

[nycphp-talk] sql query with php

jlesidt sumisudhir at yahoo.com
Mon Mar 13 10:06:15 EST 2006


Hi,
   
    I have the following query dynamically generated in php.
   
  select CompSecDes,ID,SecDes, CAST(CapitalNumShare AS int) as CapitalNumShare,NCapitalNumShare,CAST(CapitalShareStock AS int) as CapitalShareStock,NCapitalShareStock,PriceMonthOpen,NPriceMonthOpen,PriceMonthLastDay,NPriceMonthLastDay,Year from [tablename] where year between 1869 and 1869 and Month between 1 and 12 and ID in (select distinct ID from tablename where CompSecDes ='"Illustrated London News" & " Sketch" ordinary')
   
  This works perfectly fine in mssql query analyzer. But when this is executed through php no rows are returned. Should I not use "in" and subquery in php. Any help will be greatly appreciated.
   
  Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060313/5a003926/attachment.html>


More information about the talk mailing list