Skip to content
Browse files

Add crawl_tag to query results.

  • Loading branch information...
1 parent 2cac027 commit a4d6976a4e93e48cbd8c01da08177f8de3d02ba7 @gregelin gregelin committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 query.php
View
8 query.php
@@ -4,15 +4,17 @@
include('includes/functions.php');
include('includes/mysql_functions.php');
-$sql = "SELECT url, title, clicks, http_code, size, type, modified, (SELECT count(*) FROM links WHERE `to` = urls.ID) as incoming, (SELECT count(*) FROM links WHERE `to` = urls.ID) as outgoing from urls";
+$sql = "SELECT url, title, clicks, http_code, size, type, modified, crawl_tag, (SELECT count(*) FROM links WHERE `to` = urls.ID) as incoming, (SELECT count(*) FROM links WHERE `to` = urls.ID) as outgoing from urls";
if ($_GET) {
- $sql .= " WHERE";
+ $sql .= " WHERE `crawl_tag` = '$crawl_tag' AND ";
foreach ($_GET as $field=>$value) $sql .= " `$field` = '". urldecode($value) . "'";
+} else {
+ $sql .= " WHERE `crawl_tag` = '$crawl_tag'";
}
-$sql .= " LIMIT 100";
+$sql .= " LIMIT 300";
$pages = mysql_query($sql);

0 comments on commit a4d6976

Please sign in to comment.
Something went wrong with that request. Please try again.