file_get_contents (or other suggested)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

seattle_newbie
Forum Newbie
Posts: 10
Joined: Mon Jan 18, 2016 6:35 pm

Re: file_get_contents (or other suggested)

Post by seattle_newbie »

Celauran wrote:How many records are we talking about? Prepared statement and iterate over your parsed list could work.
in this testing stage, just 20 rows. at the peak of our season, there could be 2500.

what you suggest does not mean much to me. to clarify, i am trying to load the contents of a third party file into a table; seems as though it should be simple. I can get a variable to contain the string, and can load the table directly from the webpage using phpadmin, but cannot do it in the php page.

"Prepared statement and iterate over your parsed list could work." A bit more of a hint would help me. I am not familiar with either of these terms
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: file_get_contents (or other suggested)

Post by Celauran »

http://php.net/manual/en/mysqli.quickst ... ements.php
http://php.net/manual/en/pdo.prepared-statements.php

Essentially, prepare your query once then loop through your array of data, executing the prepared statement on each pass. Both of the pages above have examples.
seattle_newbie
Forum Newbie
Posts: 10
Joined: Mon Jan 18, 2016 6:35 pm

Re: file_get_contents (or other suggested)

Post by seattle_newbie »

Celauran wrote:http://php.net/manual/en/mysqli.quickst ... ements.php
http://php.net/manual/en/pdo.prepared-statements.php

Essentially, prepare your query once then loop through your array of data, executing the prepared statement on each pass. Both of the pages above have examples.
thank you
Post Reply