Results 1 to 3 of 3
Apr 6, 2012, 17:20 #1
How to loop them out and should i create three txt file?
Now, i want to add some records(`title`,`name`,`content`) to my site by php script. the following way is adding one record:
$comment = Mage::getModel('review/review'); $comment->setEntityPkValue(147);//product id $comment->setTitle("the title"); $comment->setDetail("the content"); $comment>setNickname("the name"); $comment->setReviewId($review->getId()); $comment->setStores(array(Mage::app()->getStore()->getId())); $comment->save(); $comment->aggregate();
titleone test,titletwo test,titlthree test,titlefour test
the name txt file content like this:
name1, name2, name3, name4
then use `file_get_contents() and explode()`. but i don't know how to put those results into
$comment->setTitle("the title"); $comment->setDetail("the content"); $comment>setNickname("the name");
Apr 6, 2012, 17:25 #2
- Join Date
- May 2006
- Central Florida
- 171 Post(s)
- 4 Thread(s)
What you are describing is exactly what a Database is designed to do.
Is it mandatory you use text files?
Are you avoiding a Database for some reason?
Apr 6, 2012, 17:33 #3
yes, i must be use text files? could you give me some tips to tell me how to do. thank you