Advertisement
Guest User

Untitled

a guest
Oct 26th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. function insert($Resource)
  2. {
  3. if (empty($Resource->id)) {
  4. $Resource->id = $this->getId($this->table[0]);
  5. }
  6.  
  7. $lsQuery = "INSERT
  8. INTO {$this->table[0]}
  9. (
  10. `id`,
  11. `resource`,
  12. `part`,
  13. `period`,
  14. `date`,
  15. `year`,
  16. `month`,
  17. `day`,
  18. `time`,
  19. `user`
  20. )
  21. VALUES
  22. (
  23. '{$Resource->id}',
  24. '{$Resource->resource}',
  25. '{$Resource->part}',
  26. '{$Resource->period}',
  27. '{$Resource->date}',
  28. '{$Resource->year}',
  29. '{$Resource->month}',
  30. '{$Resource->day}',
  31. '{$Resource->time}',
  32. '{$Resource->user}'
  33. )";
  34.  
  35. $this->simpleQuery($lsQuery);
  36.  
  37. return $Resource->id;
  38. // return $this->id;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement