|
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
[Back to original message]
|