View Single Post
Old 11-12-2012, 03:49 PM   PM User | #3
stevenryals
New Coder

 
Join Date: Jul 2012
Posts: 60
Thanks: 4
Thanked 0 Times in 0 Posts
stevenryals is an unknown quantity at this point
Sorry i know this is noob stuff.. but i'm in the learning phase here

I have:

Code:
$tagval = $_POST['tagval']; 
$cpmval = $_POST['cpmval']; 

if (!mysql_connect($db_host, $db_user, $db_pwd))
    die("Can't connect to database");

if (!mysql_select_db($database))
    die("Can't select database");

$sql = mysql_query("DELETE FROM {$table} WHERE tag = $tagval AND cpm > $cpmval" );
if (!$sql) {
    die(mysql_error());
}
it's erroring.. says: "unknown collumn 'steven' in where clause.
the tagval i'm sending is "steven-slist" so it's obviously coming from there somehow..

I thought this was because $tag was being sent, $tag was being retried by POST and then tag was the name of the collumn.. so i changed that variable to $tagval and it's still the same..

Last edited by stevenryals; 11-12-2012 at 03:55 PM.. Reason: because my first response was dumb lol
stevenryals is offline   Reply With Quote