Advertisement:

Author Topic: Insert new ads directly into database  (Read 1573 times)

gnolino

  • Newbie
  • *
  • Posts: 35
Insert new ads directly into database
« on: November 09, 2013, 06:21:15 pm »
Hi,
I'd need to insert new ads directly into database and I'm not able to find where code is written.
When I send a item "item_add_post" where is written the code processor about?
Who knows?
Br
gnolino

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Insert new ads directly into database
« Reply #1 on: November 09, 2013, 08:32:50 pm »
@gnolino

You probably do not understand how it works:
- user fill forms when posting new listing
- osclass consolidate data and send them to database
- data are saved to database

If you want to insert listings directly to db, you do not need anything, only go to your db administration tool and insert new rows to %db_preffix%_t_item and other item related tables  ;)

gnolino

  • Newbie
  • *
  • Posts: 35
Re: Insert new ads directly into database
« Reply #2 on: November 09, 2013, 08:45:04 pm »
Thanks for your reply
I would know in which file is instruction "INSERT INTO DB....."
-- osclass consolidate data and send them to database --
I wrote a array and I wish to update it by code
br

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Insert new ads directly into database
« Reply #3 on: November 09, 2013, 08:54:28 pm »
@gnolino

I think osclass use DAO class (not 100% sure), if you need something to edit, it is better to do it earlier not when data are inserted to db.
You may be interested in oc-includes/osclass/helpers/hItem.php

gnolino

  • Newbie
  • *
  • Posts: 35
Re: Insert new ads directly into database
« Reply #4 on: November 09, 2013, 09:04:04 pm »
Thanks