Jump to content

Archived

This topic is now archived and is closed to further replies.

BrotherLogic

I hate syntax problems....

Recommended Posts

I need help with some syntax in an INSERT QUERY.

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


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

Share this post


Link to post
Share on other sites
use addslashes() on data that's posted to the database.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.