From: Gabriel Dunne Date: Mon, 18 Apr 2011 02:39:36 +0000 (-0700) Subject: Added delete X-Git-Tag: v0.1~80 X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=44c584615cb55117c33f89ffd9ebeb942e26e088;p=clmpr.git Added delete --- diff --git a/.htaccess b/.htaccess index d5fd0d3..c8fdc6b 100644 --- a/.htaccess +++ b/.htaccess @@ -2,6 +2,5 @@ Options +FollowSymLinks RewriteEngine On # redirect every other request to the index -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule . index.php [L] \ No newline at end of file +RewriteRule /*\.(css|php|js|gif|png|jpe?g)$ - [NC,L] +RewriteRule ^(.*)$ index.php?_url=$1 [QSA,L] diff --git a/get.php b/get.php index 01578d7..ca8434b 100644 --- a/get.php +++ b/get.php @@ -13,7 +13,7 @@ if ($params['user']) { $user = get_users($dbh, array('user' => $params['user'] )); if ($user) { - $q = $dbh->prepare(" SELECT * FROM clumps JOIN users ON users.id = clumps.user_id WHERE user_id = ? ORDER BY date DESC "); + $q = $dbh->prepare(" SELECT *, clumps.id as clump_id FROM clumps JOIN users ON users.id = clumps.user_id WHERE user_id = ? ORDER BY date DESC "); $q->execute( array( $user['id'] )); } else { @@ -22,7 +22,7 @@ } else { - $q = $dbh->prepare("SELECT * FROM clumps JOIN users ON users.id = clumps.user_id ORDER BY date DESC"); + $q = $dbh->prepare("SELECT *, clumps.id as clump_id FROM clumps JOIN users ON users.id = clumps.user_id ORDER BY date DESC"); $q->execute(); } } @@ -34,17 +34,33 @@ include 'head.html'; - echo '