Changeset 542 for trunk/Modules/News/ImportKinoVatra.php
- Timestamp:
- Jun 2, 2013, 9:14:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/ImportKinoVatra.php
r533 r542 27 27 $Date = TimeToMysqlDateTime(strtotime($Date)); 28 28 29 $Query = 'SELECT Id FROM News WHERE (`Title`="'.$ Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$Database->real_escape_string($Description).'") AND (`Link` = "'.$Database->real_escape_string($Link).'")';30 $DbResult = $ Database->query($Query);29 $Query = 'SELECT Id FROM News WHERE (`Title`="'.$System->Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$System->Database->real_escape_string($Description).'") AND (`Link` = "'.$System->Database->real_escape_string($Link).'")'; 30 $DbResult = $System->Database->query($Query); 31 31 if($DbResult->num_rows == 0) 32 32 { 33 $ Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));34 echo($ Database->insert_id.',');33 $System->Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link)); 34 echo($System->Database->insert_id.','); 35 35 } 36 36 }
Note:
See TracChangeset
for help on using the changeset viewer.