This code does not update my mysql.
//the $q is sent from ajax and looks like this
thumbsup.546 or thumbsdown.567
//the $q is sent trough a working ajax function and looks like this
<a href="#" onclick="thefunction(thumbsup.'.$row['wallid'].');">[+]</a>
$q = mysql_real_escape_string($_GET['q']);
$findme = 'thumbsup';
$pos = strpos($q, $findme);
if($pos == TRUE){
$thumb = $q;
$end = end(explode('.', $q));
mysql_query("UPDATE linkwall SET thumbsup=thumbsup +1,thumbuserid='$userid' WHERE wallid ='$end' LIMIT 1");
}
$findme = 'thumbsdown';
$pos = strpos($q, $findme);
if($pos == TRUE){
$thumb = $q;
$end = end(explode('.', $q));
mysql_query("UPDATE linkwall SET thumbsdown=thumbsdown +1,thumbuserid='$userid' WHERE wallid ='$end' LIMIT 1");
}