Jump to content

* advice using $sqls frequently


unistake

Recommended Posts

Hi all,

 

I am developing a CMS sort of website and during the planning I can see that I will be using a lots of variations of $sql and $results in previous websites I have just re-typed the whole script on every PHP page where they were needed.

 

To keep the scripts a bit tidier this time, I was hoping to get some advice as to the best way to use/manage them.

 

E.g. Should I copy and paste the $sql codes in every PHP page?

      Should I create a functions.php page and include all the variations of $sql that I will be using all call for them when needed?

      Or Should I go about it another way!?

 

Thanks for any advice.

Link to comment
https://forums.phpfreaks.com/topic/220255-advice-using-sqls-frequently/
Share on other sites

I have not written a line of code yet.

 

Can you tell me moire about classes to handle SQL - never heard of this - I am an advanced beginner!

 

Thanks

 

If you Google for this topic (PHP sql database class) then you will find many examples.  If you have specific questions I will be more than happy to help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.