Print MySQL Query





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2  ...  8 9 10 11 12 13 14 15 16 Next »
8
Date Submitted Tue. Feb. 21st, 2006 9:50 PM
Revision 2
Coder mattrmiller
Tags PHP | Ping | PingOMatic
Comments 0 comments
Ping, PingOMatic service for an updated. Requires: The Inutio XML-RPC Library.
9
Date Submitted Mon. Feb. 20th, 2006 11:22 AM
Revision 2
Beginner elbartoli
Tags connect | display | mysql | PHP
Comments 1 comments
Connect to MySQL db & display result from Table query
8
Date Submitted Sun. Feb. 19th, 2006 2:27 PM
Revision 2
Coder mattrmiller
Tags PHP | Referrer | Validate
Comments 6 comments
Fixed missing $ sign.
11
Date Submitted Fri. Feb. 17th, 2006 1:14 PM
Revision 1
Coder mattrmiller
Tags "Magic Quotes" | PHP | Slashes | Strip
Comments 1 comments
This only seems appropriate, we were fighting with a similar issue this morning.
-7
Date Submitted Fri. Feb. 17th, 2006 4:52 AM
Revision 3
Helper mercutio
Tags mysql
Comments 0 comments
I use this method for keeping my sql templates away from my code.

You can extend upon the idea, as I have done in the past, by placing SQL handing classes between your scripts and the template library.

Things to note here:

The lesser userd heredoc string method. The reason this is used is to keep the SQL clear and well laid out, and not as messy as using quotes.

vsprintf() is a very handy function if you don't want to hard code the number of parameters to interpolate your string with.

The use of sprintf templates offers you additional security. For example, only allowing numbers to be placed where a %d falls. This, of course, shouldn't be the only security on user supplied variables, but comes in extra handy for debugging purposes.

Regarding the TODO in there, it would take a check of the number of % placeholders there are in the template. One caveat is remembering to remove the count of %%'s that appear (the literal percentage).
7
Date Submitted Mon. Nov. 28th, 2005 4:35 PM
Revision 1
Beginner Michael
Tags Extract | PHP
Comments 3 comments
Using the extract() Functio
21
Date Submitted Fri. Nov. 11th, 2005 2:51 PM
Revision 1
Beginner Possibility
Tags Paragraph | PHP | String
Comments 0 comments
Proper Paragraphs
28
Date Submitted Tue. Nov. 8th, 2005 4:53 AM
Revision 1
Beginner jelena
Tags Image | PHP | Thumbnail
Comments 8 comments
Create a Thumbnail
5
Date Submitted Fri. Oct. 21st, 2005 9:52 AM
Revision 1
Coder mattrmiller
Tags PHP | Random | String
Comments 1 comments
Random String
23
Date Submitted Fri. Oct. 14th, 2005 5:12 PM
Revision 1
Helper lilleman
Tags Folder | PHP | Size
Comments 1 comments
Get the Size of a Folde
« Previous 1 2  ...  8 9 10 11 12 13 14 15 16 Next »