PHP/mySQL Help Needed
Here is the relevent section of the code I'm trying to use.
$sql_query "SELECT pid, post FROM ipb_posts";
$DB->query( $sql_query );
while ( $row = $DB->fetch_row() )
{
//echo ($row['pid'].",".$row['post']);
//echo ("<br />");
$post = str_replace("ipbhost.com","net",$row['post']);
//
// Need Help to Format this UPDATE command properly Please
//
$sql_command = "UPDATE ipb_posts SET post = '".$post."' WHERE pid = ".$row[pid];
// Doesn't work because the sql_command seems to have lots
// of ", ', and other stuff in it that screws up the update
// yet I want to keep these characters in the data
$UPDATER->query($sql_command);
// HELP!
}
The problem seems to be that $post has some ' and or "s in it that are messing up the SQL command. Yet, I want to keep those characters not throw them out.
I apologize is this is more of a mySQL question than a PHP question, but can anyone tell me the answer ?
Thanks!

