I'm a beginner at php, so please be gentle.. :-) I've looked for answers, but time and time again I get the same error. I can't find the error and it's drivin' me nuts!
$query = "SELECT position FROM pages WHERE subject_id = '$subject_id' ORDER BY position DESC LIMIT 1";
$bla = mysql_query($query, $connection);
$position = $bla[0];
$position += 1;
Ok, the above code is at the top of my page. From what I understand, this should do the following: get the column called 'position' from the table 'pages' where the 'subject_id' matches the subject_id I passed, and sort this and pick 1 value (which would be the highest). So I would now have 1 column with 1 value. I then grab that value, put it in 'position' and increment that with 1.
But the error I get back is: "Column count doesn't match value count at row 1"
Again, I'm a beginner (I'm used to another language), so this is probably something small and stupid that I forgot/did wrong.. can anyone help me out?