Thread: SQLite
View Single Post
  #5  
Old 04-16-2009, 04:56 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Well until the next update I've been using this as a work around.

PHP Code:
function sqlescape(str) {
  if (
str.pos("'") >= 0) {
    
temp.result str.escape().tokenize("\\\'");;
    for (
temp.pieceresult
      
temp.nresult @= piece "''";
    return 
temp.nresult.substring(0,nresult.length() - 2);
  }
  else return 
str.escape();

As well as format2 to accomplish that "parameterized query" request.
__________________
Quote:
Reply With Quote