Jump to content

Help with custom query functions


Spectre

Recommended Posts

Ok, so my problem is this, I want to find out firstly how to make a custom query thing, so instead of mysqli_query... it's be like retrib_query ... not sure how to go about this, and also would like one for fetch assoc and mysqli_free_result() .... so that's my first problem, not sure even where tog et started in this so any help would be greatly appreciated ^^'' also would there be a way to make it so that the database won't take normal mysqli_query or w/e if I have the retrib_query setup done? to try put off wouldbe SQL injectors and hackers etc...

 

Any help would be greatly recieved, and sorry if this has come up before but after reading through a lot of topics I kinda started to get a headache so wasn't sure if it had bene asnwered some way before.

Link to comment
https://forums.phpfreaks.com/topic/111176-help-with-custom-query-functions/
Share on other sites

I can only assume that you mean a database abstraction layer, and not creating functions in core php....

 

Use Zend_Db as an example:  http://framework.zend.com/manual/en/zend.db.html

 

You can simply extend the classes and name them whatever you want:

 

class retrib_query extends Zend_Db_Select {
  ...
}

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.