Index: trunk/phpwiki/fpw/special_dosearch.php |
— | — | @@ -321,6 +321,7 @@ |
322 | 322 | AND cur_title NOT LIKE \"%:%\""; |
323 | 323 | |
324 | 324 | $result = mysql_query ( $sql1 , $connection ) ; |
| 325 | + if ( $result == 0 ) return htmlspecialchars ( mysql_error () ) ; |
325 | 326 | $row = mysql_fetch_object ( $result ); |
326 | 327 | $titleSearch = $row->cnt ; |
327 | 328 | mysql_free_result ( $result ) ; |
— | — | @@ -331,6 +332,7 @@ |
332 | 333 | AND cur_title NOT LIKE \"%:%\""; |
333 | 334 | |
334 | 335 | $result = mysql_query ( $sql2 , $connection ) ; |
| 336 | + if ( $result == 0 ) return htmlspecialchars ( mysql_error () ) ; |
335 | 337 | $row = mysql_fetch_object ( $result ); |
336 | 338 | $allSearch = $titleSearch + $row->cnt ; |
337 | 339 | mysql_free_result ( $result ) ; |
— | — | @@ -377,6 +379,7 @@ |
378 | 380 | AND cur_title NOT LIKE \"%:%\" |
379 | 381 | LIMIT $offset1, $limit1" ; |
380 | 382 | $result1 = mysql_query ( $sql1 , $connection ); |
| 383 | + if ( $result1 == 0 ) return htmlspecialchars ( mysql_error () ) ; |
381 | 384 | } else $result1 = ""; |
382 | 385 | |
383 | 386 | $offset2 = max ( $startat - $titleSearch - 1, 0 ); |
— | — | @@ -389,6 +392,7 @@ |
390 | 393 | AND cur_title NOT LIKE \"%:%\" |
391 | 394 | LIMIT $offset2, $limit2"; |
392 | 395 | $result2 = mysql_query ( $sql2 , $connection ); |
| 396 | + if ( $result2 == 0 ) return htmlspecialchars ( mysql_error () ) ; |
393 | 397 | } else $result2 = ""; |
394 | 398 | |
395 | 399 | # to save memory (cur_text can be really big) we do no collect |