Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
448 views
in Technique[技术] by (71.8m points)

php - Unable to delete more than 20000 records from mysql database using codeigniter datamapper

I am developing a site that will fetche reviews on various renowned car dealers (i.e. Fordham Toyota, Westchester Toyota, Toyota Of Manhattan etc.) from major review sites like CitySeach, Dealer Rater, Insider Pages, Yelp, Yahoo-local, Google+ etc. Basically the functionality of this site is to allow business owners to monitor their online reviews on major review sites.

I am using codeigniter and datamapper (version 1.8) in this project and facing some problems to delete data from mysql database.

Here is my part of table structures as follows:

    +----------+      +----------------+      +--------------+  
    | profiles |      | profiles_users |      | users        |
    +----------+      +----------------+      +--------------+
    | id       |<---- | id             |----->| id           |
    | name     |      | profile_id     |      | name         |
    +----------+      | user_id        |      | email        |
      |               +----------------+      | password     |
      |                                       +--------------+
      +--> +--------------+
           | reviews      |
           +--------------+
           | id           |
           | title        |
           | author       | 
           | review       |
           | rating       |
           | date         |
           | profile_id   |
           +--------------+

In the "profile" table I am storing the delar name (i.e like Fordham Toyota, Westchester Toyota etc.) and in "user" table I am storing the name of the business owners. I am using the api to fetch reviews and store them within "reviews" table with "profile-id".

There may be more than 20000 reviews for each profile. Presently I have avg. 12000 reviews per profile.

Whenever I am going to delete a profile, the reviews for that profile should be deleted , but here I get an error message like :

"Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20 bytes) in /home/business/public_html/system/database/DB_active_rec.php on line 1999"

Can anybody please suggest me in this regard.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...