Skip to content

Problems with database binding. #14

@Arwik228

Description

@Arwik228

It was necessary to chat about this technology, everything seems to be usually updated on the example of the file, but how to update the query?
`set_time_limit(0);
while (true) {
$data_source_file = R::findLast('messages', 'dialog = ? ',array($_GET['getmess']));
$last_ajax_call = isset($_GET['timestamp']) ? (int)$_GET['timestamp'] : null;
clearstatcache();
$last_change_in_data_file = $data_source_file->date;
if ($last_ajax_call == null || $last_change_in_data_file > $last_ajax_call) {
$data = $data_source_file->message;
$result = array(
'data_from_file' => $data,
'timestamp' => $last_change_in_data_file
);
$json = json_encode($result);
echo $json;
break;

} else {
    sleep(1);
    continue;
}

}`

Well, roughly, the date of the last message looks like this $data_source_file->date;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions