Forum Moderators: coopster
sample mysql feed that works:
insert into link_feeds(id,title,detail,url,image,pub_date,hits) values(5,'C.C.''s Coming: Game One Preview',"<p>The Word</p><img vspace="4" hspace="4" border="1" align="right" alt="" src="http://www.examplecom/imgage.jpg" />C.C. Sabathia's a Cy Young favorite after going 19-7 this season for the AL Central champions, has won 100 games in his seven years as a big leaguer and at 6-7, 290 pounds is one of the more recognizable players in all the game. All of that makes him a pretty poorly-kept secret around baseball circles. Unless you play for the Yankees. <br /><br />In a strange coincidence Game One will be the first time the Bronx Bombers have faced Sabathia since September 1, 2004. A lot has changed in that time. The 2004 Sabathia was an unrefined power pitcher with a 4.12 ERA and 72 walks in 188 innings. This year's version has a 3.21 ERA and walked just 37 batters in his league-leading 241 innings pitched. That gap between appearances means you can throw out the lefty's 1-7 career mark and 7.13 lifetime ERA against the Yankees. T",'http://www.exampleurl','',1191520186,0)
Sample PHP doing this(I get error in php here):
$s_two="insert into link_feeds(id,title,detail,url,image,pub_date,hits) values(" . $auto_row['rssid'] . ",'" . $title . "',"" . htmlentities($detail) . "",'" . $url . "','" . $img . "'," . $cur_time . ",0)";
mysql_query($s_two);
Sample PHP doing this(I get error in the mysql insert this way here):
$s_two="insert into link_feeds(id,title,detail,url,image,pub_date,hits) values(" . $auto_row['rssid'] . ",'" . $title . "','" . htmlentities($detail) . "','" . $url . "','" . $img . "'," . $cur_time . ",0)";
mysql_query($s_two);
So how can I appropriately do this since it takes it when inserting regular with double quotes ", but when you inserted "" in the php I get a php error.
Thanks in advance.
B