You are here: Re: XML to mySQL - Loop issue? « PHP Programming Language « IT news, forums, messages
Re: XML to mySQL - Loop issue?

Posted by Rik Wasmus on 10/28/07 19:16

On Sun, 28 Oct 2007 19:15:32 +0100, Sarah <Hersheys98@aol.com> wrote:

> Hi -
>
> I am relatively new to PHP and mySQL. I am trying to loop through a
> bunch of
> XML feeds, pull out some info and place it into a mySQL table. I am
> able to loop through the feeds, pull out all the relevant info and
> print
> it to my browser with no problem using simpleXML for the parsing.
> When I try inserting the variables into mySQL instead of printing the
> variables to the browser it will only pull the first item and date
> from each XML page instead of all of the data. I have no idea
> why this would be. Any ideas? Here is the code I have so far:

While developing, check mysql_error() for any failed queries. And escape
your data properly with mysql_real_escape_string before using it in a
query. If the same loop prints the data correctly, check what your if
statements and your insert query actually do.
--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация