Thanks big time! The reason I need it is case: I convert thread title on the URL that looks like this:
this-is-a-title on the new thread creation I check if this matches any value already in the database if so then I add at the end of the URL thread tid some like SEO Plugin.
this-is-a-title-2456
Can I update the table then through another query which will fetch the latest tid and then update the table second time. Sound really.
This will create an ID
$data = array(
"title" => $title,
"description" => $description,
"message" => $message
);
$db->update_query("ads", $data);
Now fetch latest ID
$q = $db->query("
SELECT max(id)
FROM ".TABLE_PREFIX."ads a
");
$row = $db->fetch_array($q);
$id = $row['max(id)'];
then update the query second time:
$data = array(
"url" => $string,
);
$db->update_query("ads", $data, "id='{$id}'");
Finally redirect
redirect("ads.php", $lang->success);