Why isn't this inserting the data into applications table?
function setAppData($url_id, $name, $version) {
$query = "INSERT INTO applications(url_id, naam, versie)
VALUES( '$url_id',
'$name',
'$version'
)";
mysql_query($query, SQLConnection());
}
however if I do it like below, then it seems to work.
function setAppData($url_id, $name, $version) {
$u = $url_id;
$n = $name;
$v = $version;
$query = "INSERT INTO applications(url_id, naam, versie)
VALUES( '$u',
'$n',
'$v'
)";
mysql_query($query, SQLConnection());
}
The way I call the function:
setAppDate(1,"apache","2.4.9");
'$v',you have an extra comma.VALUES( '".$url_id."', '".$name."', ...