Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-14 01:54:04

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Writing secure/safe SQL statements... Tips?

Hey all,

Just hoping I could get a few tips from the pro TXP users about writing secure/safe sql statements in my TXP plugin code…

For example, looking at other plugins, I see functions like:

  • doSlash()
  • safe_rows_start()

I guess those are the two main functions that I see in most plugins…

Well, just curious if I could get some tips on when to use those (and other) built-in TXP functions… Basically, I want to be sure I write the most safe and optimized queries for my future TXP plugins (and other) code.

TIA! :)
Cheers,
Micky

Offline

#2 2007-12-14 04:16:11

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Writing secure/safe SQL statements... Tips?

Take a look at txplib_db.php for TXP’s db functions.

Offline

#3 2007-12-14 05:59:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Writing secure/safe SQL statements... Tips?

Google for PHP/MySQL security and you will get a wealth of helpful information. Then look to the built-in functions to see what they offer.

Offline

#4 2007-12-14 06:14:06

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Re: Writing secure/safe SQL statements... Tips?

Thanks jm and Mary, great advice. :)

Thanks for taking the time to reply.

Have a great one!
Cheers,
Micky.

Offline

Board footer

Powered by FluxBB