Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2007
    Location
    Pasadena, Maryland, United States
    Posts
    21
    Plugin Contributions
    0

    Default SQL Query Executor

    Ok, I have looked in a lot of places and can't find anything on this. What is the upper limit of SQL queries that can be pasted into the Admin SQL Query Executor? In which file can it be changed to be raised or lowered?

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: SQL Query Executor

    It has no imposed limits.

    Why?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2007
    Location
    Pasadena, Maryland, United States
    Posts
    21
    Plugin Contributions
    0

    Default Re: SQL Query Executor

    no limits? Hmmm then what might limit it? A setting on the server? I was playing with a dev site and attempted to paste in a 1.5MB txt file of queries and it gave me an error saying "Error: Nothing to do - no query or query-file specified." I then manually split the file in half and pasted each individually and it worked fine for both files (~4500 queries for one and ~5000 queries for the other). There isn't a limit of 1MB to paste in perhaps or the number of queries that can be run? I know this is an obscure issue but am curious where the limit is imposed. I looked at sqlpatch.php in the admin directory and didn't see a limiter, and I didn't see a class or module file in the admin for sqlpatch either. Perhaps it is in the php.ini file on the server? If so, maybe I can override this in the root. Any other ideas?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: SQL Query Executor

    Quote Originally Posted by tomreitz View Post
    I was playing with a dev site and attempted to paste in a 1.5MB txt file of queries
    What kind of queries?

    Quote Originally Posted by tomreitz View Post
    and it gave me an error saying "Error: Nothing to do - no query or query-file specified."
    That suggests that the data submitted didn't actually get received by the server.[/quote]
    Quote Originally Posted by tomreitz View Post
    I then manually split the file in half and pasted each individually and it worked fine for both files (~4500 queries for one and ~5000 queries for the other).
    Well, I guess you've found your best workaround.
    Quote Originally Posted by tomreitz View Post
    There isn't a limit of 1MB to paste in perhaps or the number of queries that can be run?
    No.
    Quote Originally Posted by tomreitz View Post
    I know this is an obscure issue but am curious where the limit is imposed. I looked at sqlpatch.php in the admin directory and didn't see a limiter, and I didn't see a class or module file in the admin for sqlpatch either.
    That's because the limit is not imposed by Zen Cart. It must be something in your browser or in your server's PHP configuration.

    Quote Originally Posted by tomreitz View Post
    Perhaps it is in the php.ini file on the server? If so, maybe I can override this in the root. Any other ideas?
    Quote Originally Posted by tomreitz View Post
    no limits? Hmmm then what might limit it? A setting on the server?
    Maybe your post_max_size in your php.ini


    I'm more interested in understanding why you're pasting such huge queries into a tool that's intended for small minor patching, not mass insertion of records or site upgrades.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jun 2007
    Location
    Pasadena, Maryland, United States
    Posts
    21
    Plugin Contributions
    0

    Default Re: SQL Query Executor

    What kind of queries?
    here is a complete sample:

    insert into address_book values(1313678700,1313678700,'',NULL,'Pamela','Smith','1313 Mockingbird Lane',NULL,'00966','Beachhead','MD',223,41);
    insert into customers values(1313678700,'M','Pamela','Smith','0001-01-01 00:00:00','[email protected]','',1313678700,'4022145804',NULL,'',NULL,0,'T EXT',0,'','',0);
    insert into orders values(1313678700,1313678700,'Pamela Smith',NULL,'1313 Mockingbird Lane',NULL,'Beachhead','00966','MD','US','4022145804','[email protected]', 0,'Pamela Smith',NULL,'1313 Mockingbird Lane',NULL,'Beachhead','00966','MD','US',0,'Pamela Smith',NULL,'1313 Mockingbird Lane',NULL,'null','00966','MD','US',0,'CC','''','N','','','V','Pamela Smith','xxxxxxxxxxxx1313','xxxx','','2009-11-29 00:04:24','2009-11-29 00:04:24',1,'2009-11-29 00:04:24','USD',1,53.80,0.00,'0','');
    insert into orders_products values(NULL,1313678700,1,'widget1','widgets',18.95,18.95,0.00,2,0.00,0,0,0,0,'') ;
    insert into orders_total values(NULL,1313678700,'Sub-Total:',37.90,37.90,'ot_subtotal',100);
    insert into orders_total values(NULL,1313678700,'Handling',15.90,15.90,'ot_shipping',200);
    insert into orders_total values(NULL,1313678700,'Sales Tax',0.00,0.00,'ot_tax',300);
    insert into orders_total values(NULL,1313678700,'Total:',53.80,53.80,'ot_total',999);
    insert into orders_status_history values(1313678700,1313678700,1,'2009-11-29 00:04:24',0,'');

    I am hoping to transfer orders from an external windows db server to a zencart db to be able to use some of the zencart's features for account tracking / reporting for clients. The source at the external database is just the raw data.


    Maybe your post_max_size in your php.ini
    Great. I will look there.


    I'm more interested in understanding why you're pasting such huge queries into a tool that's intended for small minor patching, not mass insertion of records or site upgrades.
    Was simply looking for the easiest method to do what I mentioned above without having to code everything from scratch. This database / site would not even have a public ordering site... just an order tracking login area so there would be no traffic and no load on the db server hardly ever... it is mainly so the client can use some of the really useful plugins from zencart that are already done. Hope that kinda makes sense. If not using the sql executor tool, what would you say would be the best method to do what I am attempting? Perhaps I missed something really obvious here. A few things: I have no access to the windows db server except to tell them what I want and I chose the mysql statements like above. I also have no access to shell on the zencart server... only phpmyadmin. (And PHPmyADMIN's import tool today also timed out when trying to import this complete file today)

  6. #6
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: SQL Query Executor

    Quote Originally Posted by tomreitz View Post
    I also have no access to shell on the zencart server... only phpmyadmin. (And PHPmyADMIN's import tool today also timed out when trying to import this complete file today)
    phpMyAdmin would be the recommended tool for larger datasets.
    But, if you're having the same issues using that, then the problem is likely limitations in your server PHP config.

    Naturally, you can split it into smaller batches, as you've discovered.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jun 2007
    Location
    Pasadena, Maryland, United States
    Posts
    21
    Plugin Contributions
    0

    Default Re: SQL Query Executor

    Thanks Dr. Byte!

 

 

Similar Threads

  1. v139h Use of SQL Query Executor
    By GerryTheMole in forum General Questions
    Replies: 5
    Last Post: 26 Mar 2014, 03:07 PM
  2. v150 SQL Query Executor
    By dochsa in forum General Questions
    Replies: 3
    Last Post: 7 Sep 2012, 11:14 AM
  3. SQL Query Executor
    By pukman in forum General Questions
    Replies: 1
    Last Post: 8 Jul 2009, 11:43 AM
  4. SQL Query Executor
    By MeltDown in forum General Questions
    Replies: 2
    Last Post: 15 Jul 2006, 05:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR