PHP Runner - Duplicate Records after import - Fixed

Поделиться
HTML-код
  • Опубликовано: 30 янв 2025

Комментарии • 24

  • @oegicioBR
    @oegicioBR 3 года назад +1

    Please, There is a way to Discover the name o Excel File Imported and save it at another Tabel?

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks  3 года назад +1

      No. Not with this method. The reason is that the file gets uploaded into a temp environment and will be deleted after the import is complete. The server also changes the filename during this process. A custom import is required for what you describe. You would first upload the file and save it in some table or on the disk and then execute a custom call to the import class.

    • @oegicioBR
      @oegicioBR 3 года назад

      @@PHPRunnerTipsAndTricks Thank you, Excellent Explanation.

  • @NhojimarMarte-t4n
    @NhojimarMarte-t4n 8 месяцев назад

    Is there any way for me to add validation to allow only Excel files to be imported?

  • @ryckocharles1607
    @ryckocharles1607 6 лет назад +2

    How to prevent duplicate values if the record primary key already in the table? I mean, skipped import row if the record row already in the table

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks  6 лет назад

      Very good question. This might require a change in the actual import class. I will look into this and feedback as soon as possible.

  • @rizwanmtc
    @rizwanmtc 8 месяцев назад

    i set the key in tables key+auto increment, not null , but import add the rows in the last

  • @sipanhesen9891
    @sipanhesen9891 3 года назад +1

    Thanks dear, but i have problem with insert more than 1000 rows, what i have to do to solve this problem?

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks  3 года назад +2

      If you are using PHP, the problem is most likely in the PHP.ini file on the server. The 1000 rows are not the problem. 1000 rows increase the file size so you need to change the upload_max_filesize to let say 100 M or whatever will work. I would also look at post_max_size and max_execution_time. All these settings are to be found in the php.ini.

    • @sipanhesen9891
      @sipanhesen9891 3 года назад

      @@PHPRunnerTipsAndTricks dear after i do it, is give me this error, allowed memory size of 1348,17728 bytes exhausted (tried to allocate 4096 bytes). In plugins\PHPExcel\Worksheet.php on line 2353

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks  3 года назад +1

      @@sipanhesen9891 In the same file find php_value memory_limit and increase the memory. the value -1 in not advisable.

    • @sipanhesen9891
      @sipanhesen9891 3 года назад

      @@PHPRunnerTipsAndTricks hi dear the error didn't solved

    • @sipanhesen9891
      @sipanhesen9891 3 года назад +1

      @@PHPRunnerTipsAndTricks Fatal error: Maximum execution time of 600 seconds exceeded

  • @donavandupreez6492
    @donavandupreez6492 2 года назад +1

    Good day Sir can you please explain the same thing using PhpMyAdmin i have tried this and been struggling.
    Thank you in advanced

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks  2 года назад

      In PhpMyAdmin you must use the ALTER TABLE command. Make sure your table has a key. See this link: dev.mysql.com/doc/refman/8.0/en/alter-table.html

    • @donavandupreez6492
      @donavandupreez6492 2 года назад +1

      @@PHPRunnerTipsAndTricks Thank you so much got it sorted with your help .....Happy days🥳🥳

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks  2 года назад

      @@donavandupreez6492 Happy days indeed.

  • @INFORMATICAROCASA
    @INFORMATICAROCASA Год назад

    I have a table which already has the ID as the primary key, I can´t change that because I need it, I can only add other columns as primary key, but my excel file doesn´t have the ID column, I did the test and it duplicates the records, I think it´s because the ID as primary key, how can I fix it?

  • @k_a_r_i_s-1812
    @k_a_r_i_s-1812 4 года назад +1

    I love your videos sooo much. thank you for the good work.Is there a way to make an audit trail for the imported documents and create a summary dashboard report of the users that imported the data when and how many records have been imported daily

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks  4 года назад +3

      Yes, it is possible with some event coding.

    • @k_a_r_i_s-1812
      @k_a_r_i_s-1812 4 года назад

      @@PHPRunnerTipsAndTricks thank you for the response kindly make a video on it

  • @daniellesieur8151
    @daniellesieur8151 Год назад

    I would like to import a file that contains fields by rows instead of column (ris file for publications)! How can I manage that kind of import ? Thx and BTW your video are of great help :)

  • @rizwanmtc
    @rizwanmtc 8 месяцев назад

    import in sql view not shoe import in pages tab , not not check the duplicate key just add imported record