-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 0 replies
- 0 views
-
WordPress-Theme Twenty Twenty Four-customizing: how to do that - a Gutenberg special question...
By thedhubs,
- 2 answers
- 3203 views
-
- 0 replies
- 12 views
-
- 3 answers
- 5456 views
-
QNAP issues patch for an RCE security vulnerability affecting PHP in NAS Drive management
By Alap Naik Desai,
- remote code execution
- rce
- (and 12 more)
- 0 replies
- 18 views
-
Question
game_over
Having trouble inserting some data into a database, basically i'm scraping data from an RSS feed and looping through each entry and inserting it into a database but when it gets to the 'content' field it fails, but there is no errors, it just wont insert.. if i remove the content field then it inserts just fine so i think thats the culprit.
$RSS_DOC = simpleXML_load_file($feed_url); foreach($RSS_DOC->channel->item as $RSSitem) { $content = $RSSitem->description; $item_insert_sql = "INSERT INTO default_posts(content) VALUES ('$content')"; $insert_item = mysql_query($item_insert_sql, $db); }$RSSitem->description would be:
if i $echo description; it prints correct so i know it's pulling the data but why wont it go into to the DB? the $content field is set to LONGTEXT.
Does it have anything to do with <![CDATA[ ?
Any suggestions?
sorry about double post neowin borked
Link to comment
https://www.neowin.net/forum/topic/1108587-field-wont-insert-into-the-database/Share on other sites
1 answer to this question
Recommended Posts