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 8749787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:45:10+00:00 2026-06-13T12:45:10+00:00

I am attempting to generate a list of SQL commands that i will later

  • 0

I am attempting to generate a list of SQL commands that i will later insert. The only part at this time I seem to be stuck on is looping the file name. I need my scandir to loop through the nofilter directory and change $image each time a new line or sql query is given. I have the code and output below. Essentially no sql query should have the same $image being echo’d into it

for ($i=1351314000; $i<=1351400400; $i+= 14400) {
    $images = scandir("/home/fb/public_html/post/uploads/nofilter/");
    foreach($images as $image) {

    }

//copy file over from no filter
$orig = "/home/fb/public_html/post/uploads/nofilter/".$image."";
$dest =   "/home/fb/public_html/post/uploads/".$image."";
//copy($orig, $dest);


//output
  echo "The number is " . $i . "<br />";
echo $image;
echo "<br>";
echo "<br>";
echo "<br>";

echo "

INSERT INTO `fb_fb`.`postcron_schedule` (
`id` ,
`status_message` ,
`link` ,
`photo_url` ,
`status_name` ,
`status_caption` ,
`status_description` ,
`uid` ,
`page_id` ,
`access_token` ,
`post_to` ,
`status_type` ,
`schedule_type` ,
`is_process` ,
`process_time` ,
`process_at` ,
`display_time` ,
`created_by`
)
VALUES (
NULL , '', '', '/home/fb/public_html/post/includes/../uploads/". $image ."', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '". $i ."', NULL , '". $i ."', '100000103637895'
);
";

echo "<br>";
echo "<br>";

 }

The output looks like this

The number is 1351314000 8120925654_4041b7c50f_o.jpg


INSERT INTO `fb_fb`.`postcron_schedule` ( `id` , `status_message` , `link` , `photo_url` , `status_name` , `status_caption` , `status_description` , `uid` , `page_id` , `access_token` , `post_to` , `status_type` , `schedule_type` , `is_process` , `process_time` , `process_at` , `display_time` , `created_by` ) VALUES ( NULL , '', '', '/home/fb/public_html/post/includes/../uploads/8120925654_4041b7c50f_o.jpg', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '1351314000', NULL , '1351314000', '100000103637895' );

The number is 1351328400 8120925654_4041b7c50f_o.jpg


INSERT INTO `fb_fb`.`postcron_schedule` ( `id` , `status_message` , `link` , `photo_url` , `status_name` , `status_caption` , `status_description` , `uid` , `page_id` , `access_token` , `post_to` , `status_type` , `schedule_type` , `is_process` , `process_time` , `process_at` , `display_time` , `created_by` ) VALUES ( NULL , '', '', '/home/fb/public_html/post/includes/../uploads/8120925654_4041b7c50f_o.jpg', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '1351328400', NULL , '1351328400', '100000103637895' );

The number is 1351342800 8120925654_4041b7c50f_o.jpg


INSERT INTO `fb_fb`.`postcron_schedule` ( `id` , `status_message` , `link` , `photo_url` , `status_name` , `status_caption` , `status_description` , `uid` , `page_id` , `access_token` , `post_to` , `status_type` , `schedule_type` , `is_process` , `process_time` , `process_at` , `display_time` , `created_by` ) VALUES ( NULL , '', '', '/home/fb/public_html/post/includes/../uploads/8120925654_4041b7c50f_o.jpg', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '1351342800', NULL , '1351342800', '100000103637895' );

The number is 1351357200 8120925654_4041b7c50f_o.jpg


INSERT INTO `fb_fb`.`postcron_schedule` ( `id` , `status_message` , `link` , `photo_url` , `status_name` , `status_caption` , `status_description` , `uid` , `page_id` , `access_token` , `post_to` , `status_type` , `schedule_type` , `is_process` , `process_time` , `process_at` , `display_time` , `created_by` ) VALUES ( NULL , '', '', '/home/fb/public_html/post/includes/../uploads/8120925654_4041b7c50f_o.jpg', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '1351357200', NULL , '1351357200', '100000103637895' );

The number is 1351371600 8120925654_4041b7c50f_o.jpg


INSERT INTO `fb_fb`.`postcron_schedule` ( `id` , `status_message` , `link` , `photo_url` , `status_name` , `status_caption` , `status_description` , `uid` , `page_id` , `access_token` , `post_to` , `status_type` , `schedule_type` , `is_process` , `process_time` , `process_at` , `display_time` , `created_by` ) VALUES ( NULL , '', '', '/home/fb/public_html/post/includes/../uploads/8120925654_4041b7c50f_o.jpg', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '1351371600', NULL , '1351371600', '100000103637895' );

The number is 1351386000 8120925654_4041b7c50f_o.jpg


INSERT INTO `fb_fb`.`postcron_schedule` ( `id` , `status_message` , `link` , `photo_url` , `status_name` , `status_caption` , `status_description` , `uid` , `page_id` , `access_token` , `post_to` , `status_type` , `schedule_type` , `is_process` , `process_time` , `process_at` , `display_time` , `created_by` ) VALUES ( NULL , '', '', '/home/fb/public_html/post/includes/../uploads/8120925654_4041b7c50f_o.jpg', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '1351386000', NULL , '1351386000', '100000103637895' );

The number is 1351400400 8120925654_4041b7c50f_o.jpg


INSERT INTO `fb_fb`.`postcron_schedule` ( `id` , `status_message` , `link` , `photo_url` , `status_name` , `status_caption` , `status_description` , `uid` , `page_id` , `access_token` , `post_to` , `status_type` , `schedule_type` , `is_process` , `process_time` , `process_at` , `display_time` , `created_by` ) VALUES ( NULL , '', '', '/home/fb/public_html/post/includes/../uploads/8120925654_4041b7c50f_o.jpg', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '1351400400', NULL , '1351400400', '100000103637895' );
  • 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-06-13T12:45:11+00:00Added an answer on June 13, 2026 at 12:45 pm

    Based on your comment, why not do it like this instead?

    <php
    $time = time();
    $images = scandir("/home/fb/public_html/post/uploads/nofilter/");
    foreach($images as $image) {
        if ($image == '.' || $image == '..') {
            continue;
        }
    
        $time += 14400; //add 4 hours every interval
    
        //copy file over from no filter
        $orig = "/home/fb/public_html/post/uploads/nofilter/".$image."";
        $dest =   "/home/fb/public_html/post/uploads/".$image."";
        //copy($orig, $dest);
    
    
        //output
          echo "The number is " . $time . "<br />";
        echo $image;
        echo "<br>";
        echo "<br>";
        echo "<br>";
    
        echo "
    
        INSERT INTO `fb_fb`.`postcron_schedule` (
        `id` ,
        `status_message` ,
        `link` ,
        `photo_url` ,
        `status_name` ,
        `status_caption` ,
        `status_description` ,
        `uid` ,
        `page_id` ,
        `access_token` ,
        `post_to` ,
        `status_type` ,
        `schedule_type` ,
        `is_process` ,
        `process_time` ,
        `process_at` ,
        `display_time` ,
        `created_by`
        )
        VALUES (
        NULL , '', '', '/home/fb/public_html/post/includes/../uploads/". $image ."', NULL , NULL , NULL , '0', '135031429962113', 'AAAGLZAMh7YSUBALRMCW60Rdol1kD80ZBNymqkgyQfBXDour2KsvVWKFcnZB9cU9OSLRMQjnEuKHZCTNoTZC4jf9GFtMU11BTD8JZAUFl0EVgZDZD', 'page', 'photo', 'schedule', '0', '". $time ."', NULL , '". $time ."', '100000103637895'
        );
        ";
    
        echo "<br>";
        echo "<br>";
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to generate dynamic 'pretty URLs' via .htaccess so that http://mysite.com/episode.php?episode=1 will become
I am attempting to bind a list that is part of a larger view
While attempting to generate a list of subsets that exist within two sets, I
I am attempting to generate a list (from four tables) of products, classid, optionid,
I am attempting to generate datamatrix barcodes from within itext. This works fine for
I am attempting to generate a BitmapFrame that is based on a UIElement .
I am attempting to generate an Expression tree that ultimately calls a series of
I am attempting to generate a weekly email to users of my site that
I am attempting to generate a potential card 'plays' list from a predetermined hand
I am attempting to grab a date supplied via POST, then generate a list

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.