Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

sprintf

Can someone show me an example of how to sprintf with ALL characters? For example, I am trying to build an SQL string that will contain quotes, and who knows what else? It appears I have to escape it or something. A function to handle any string I throw at it would be soooooooooo helpful. Thanks.
0
edvinson
Asked:
edvinson
2 Solutions
 
TeRReFCommented:
Use this:
mysql_real_escape_string()

Example:
http://php.net/manual/en/function.mysql-real-escape-string.php
0
 
RoonaanCommented:
Hi,

You can use %s in your sprintf statement.

-r-
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now