Jump to content

coxdabd

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

coxdabd's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey dude, apologies that was just an example - a bad one. What I'm trying to ask, is say you have an Order class for example, say one of the methods is to to view a particular order in the DB, would I put the SQL inside the method or feed the SQL to it through the script through a parameter - is connecting to a database inside a class bad practice?
  2. Hi all, I'm struggling with a bit of logic here. What's the score on connection to a database inside of a class (PDO). I'm guessing it's bad practice and any queries should be passed as an array to the object - is this correct? What should I do with entering data into the DB? For example, say you have an orders class, one of the methods is to create the order, would you return an array from the method of all the data to be entered into the DB and then to enter back in the script? Getting pretty good at OOP, just need a little extra help. Have had a play with a framework (CodeIgnitor) but found it too limiting if that makes any sense - although I did like the MVC pattern.
  3. Massive help, thank you to all of your answers and help. Unfortunately I'll be scraping from the DOM for each site - very few have feeds which is a bit of a pain in the bum! So think I'll be getting close to my good old friend regex Thanks again guys/gals, this a great forum.
  4. Hi all, I'm new here (first post) so hopefully you'll all go easy on me I'm created a price comparison website for cameras and lenses. I will have around fifteen retailers on the site. Now I need to scrape each of their websites for the prices - this I can do. However, need a little help and advice on the best way to go about tackling this...is it best to create one big script or have various ones for each retailer, etc? Any help would be appreciated greatly
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.