aboutsummaryrefslogtreecommitdiffhomepage
path: root/import.php
diff options
context:
space:
mode:
Diffstat (limited to 'import.php')
-rw-r--r--import.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/import.php b/import.php
index 97072437..497e32fb 100644
--- a/import.php
+++ b/import.php
@@ -28,7 +28,12 @@ else {
28 { 28 {
29 $a = $li->find('a'); 29 $a = $li->find('a');
30 $url = $a[0]->href; 30 $url = $a[0]->href;
31 $parametres_url = prepare_url($url); 31
32 # FIXME corriger cette génération d'ID
33 $req = $db->getHandle()->query("SELECT id FROM entries ORDER BY id DESC");
34 $id = $req->fetchColumn()+1;
35
36 $parametres_url = prepare_url($url, $id);
32 $sql_action = 'INSERT INTO entries ( url, title, content, is_read ) VALUES (?, ?, ?, ?)'; 37 $sql_action = 'INSERT INTO entries ( url, title, content, is_read ) VALUES (?, ?, ?, ?)';
33 $params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read); 38 $params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read);
34 try 39 try