![]() If you keep the most used queries in one place, execution is just one click away. In the Query tab, click on Favorites > Edit favorites/Add current query as favorite. ![]() Group & sort are on my list as well, however there are still a few gotchas that I run through my head. The apps are also available as lifetime purchases, however I currently have no promo codes available for that. The beauty of SQLPro is that it allows you to save queries and get back to them when you need. This link/promo code will allow one year free of most SQLPro (macOS) apps. I'm pretty sure that 'hidemenu' is set for Articles but not for Collections, you might want to change that to 0. Once you know the ropes, find your perfect way to interact with an SQLite database. It's been a while since I've worked with Articles, so you'll need to take a look at the database and see what settings are given to Articles' children and what settings are given to Collections children. If you have a lot of them, use getIterator instead. Put the snippet on a resource, and View that resource to run the snippet. You could get fancy and make a proper MODX function out of it using getCollection to get all of the Articles' children, the loop through them setting the values and saving them. ![]() Quote from: sottwell at Sep 28, 2015, 04:17 PM I would work out a quickie SQL to set the Articles' resources parent and any other relevant fields WHERE parent = and run that from phpMyAdmin or Sequel Pro or whatever your database access method is. I execute the SQL code batch in a GUI tool in this case SQLPro or MSSQL. For example, a for loop can be inside a while loop or vice versa. Iterate over the ResultSet using for loop and get column values of each row. UPDATE `modx_site_content` SET `template` = replace(template, '49', '57') WHERE parent=11 The syntax for a nested while loop statement in the Python programming language is as follows: while expression: while expression: statement (s) statement (s) A final note on loop nesting is that we can put any type of loop inside of any other type of loop. UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=11 # switch class_key to go back to default document view for children UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'ArticlesContainer', 'CollectionContainer') WHERE id=11 # switch ArticlesContainer -> CollectionContainer When you are ready to work on a project, just launch SQLPro Studio and click Connect in the top-left corner. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |