Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7521153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:11:16+00:00 2026-05-30T02:11:16+00:00

I have user subscriptions in my DB, and the SUBSCRIPTIONS table has UID (that

  • 0

I have user subscriptions in my DB, and the SUBSCRIPTIONS table has UID (that I use with the CC company to charge the Card), and DATE_EXPIRED, DATE_PAID, VALID and LENGTH.

I am going to need to use some kind of a function to process a batch of subscriptions from the DB and send to the CC company for processing, and upon return, I should treat the subscription accordingly.

in the case the charge went ok, I mark VALID = 1, set DATE_PAID = NOW(), SET DATE_EXPIRED = NOW + INTERVAL LENGTH MONTH
but if the result is not ok, I need to mark VALID = ERROR_NO and do some actions, like sending an email, bring up messages etc.

My question is about the approach to the situation,
I will be getting a list of subscriptions that need to be updated, so:

  1. What do you think is the best way to process a batch like that?
    My internal processing function is using cURL to contact the CC server, and gets a cURL response. upon which I know what to do next.
    Is it a file I should write all necessary subscriptions to ? Is that a cURL to my own server to batch independently ? How do I send a batch of result for processing to myself ? What do you think is the best approach ?

  2. How do I keep the SELECT result to process in one time ?
    I think I should clarify. Say I theoretically have 100,000 results, I think I should seperate my SELECT to portions with LIMIT X,Y then put in memory and save on memory, but on the next SELECT I will be casting upon a perhaps different table (as it might have been updated by now). I’d like to run through all 100,000 results having the same 100,000 I had in the first SELECT. Doing all the process in the page would be uneffective of course as the whole process would drop as soon as you close the page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:11:17+00:00Added an answer on May 30, 2026 at 2:11 am

    Use LOCK TABLES subscriptions WRITE to solve your second problem, and UNLOCK the table when you are done. Although really, unless you’re running this on a server with no RAM at all, keeping these 100,000 rows in memory and going through them in a while loop using something like mysql_fetch_assoc or mysqli_fetch_assoc shouldn’t be a problem.

    As to your first question, why don’t you simply process the cURL response when you get it, and save the results in the database on a per-subscription basis? I don’t really see why you would want to put this into a separate file first, and certainly not why you would then need to use cURL to contact your own server?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 InnoDB tables: emails , websites and subscriptions . emails table has
I have 2 database tables that looks like this Subscriptions table member_id active 5
I have a table as follows id comm_id user_id .. This stores user subscriptions
So, I have a subscriptions table: id - int(11) (With Primary Key) user_id -
I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have three models: user, subscription, and channel. User: has_many :channels, :through => :subscriptions
I have a real estate website that has several categories. And i want the
I have the models User and Group, and the join table Membership which uses
I created the following table for user to user subscriptions. CREATE TABLE IF NOT
We are developing the Web App that will have user subscription to a specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.