Thursday, 15 April 2010

Select from 'view' causing execution timeout in PHP and SQL Server -



Select from 'view' causing execution timeout in PHP and SQL Server -

i have created view called stats selects sum of records adhere attribute

create view stats select sum(case when attribute = '1' 1 else 0 end) attribute1, sum(case when attribute = '2' 1 else 0 end) attribute2 table go

the view created fine , when select * stats in sql server management studio results show fine.

the problem when utilize php grab data:

$grab_stats_data = $dbh->query("select * stats"); while($row = $grab_stats_data->fetch()){ $attribute1 = $row['attribute1']; ... // , on }

i error saying [php fatal error: maximum execution time of 300 seconds exceeded in c:\ ... on line 17]

why above timeout using php (or take longer 300sec execute) display fine in sql server management studio?

use:

foreach ($grab_stats_data->fetchall() $row){ $attribute1 = $row['attribute1']; ... // , on }

php sql-server executiontimeout

No comments:

Post a Comment