Jump to content


Photo

I hate syntax problems....


  • Please log in to reply
2 replies to this topic

#1 BrotherLogic

BrotherLogic
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 15 August 2006 - 02:42 AM

I need help with some syntax in an INSERT QUERY.

 
$insertfundquery = "INSERT INTO longterm( fid, fundname, starrating) VALUES ('$fundname', '$starrating')";


Half way through a loop this script comes up in error becuase $fundname = MacKenzie's

What is the right syntax to include apostrophes in a string........

Is there a way?

Thanks Everyone


#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 15 August 2006 - 02:58 AM

use addslashes() on data that's posted to the database.
Legend has it that reading the manual never killed anyone.
My site

#3 BrotherLogic

BrotherLogic
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 15 August 2006 - 03:04 AM

:-[ I'm such a dope sometimes!!

Thanks Budd..

Really Appreciated.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users