sturmy31
Forum Replies Created
-
Forum: Plugins
In reply to: [Code Manager] Use of variables within PHP shortcodeThank you so much Peter !!!
I’m aware of Sql injection.
Thank you again even for code to sanitize ??Forum: Plugins
In reply to: [Code Manager] Use of variables within PHP shortcodeHi Peter,
Do you have an example of Php Shortcode to access URL parameters, please ?
This code could complete the Code Manager sandbox…Thanks in advance,
Roger… Of course, this feature for me is to call a stored procedure for updates and not to retrieve select results.
So your last reply is useful !Hi Peter,
I had an error in the name of the function get_results. Now the post is displayed correctly.
But when I display this post in the WPDA backend as a static page, the shortcode is not interpreted and the page displays “[cmruncode name =” Execute query from PHP shortcode ”]”
I send to you screenshots in PM.
Thanks
Roger… more, when I preview the post with the shortcode I have the following error :
Fatal error: Uncaught Error: Call to undefined method wpdb::get_restults() in /datas/vol4/yulpa164130/var/www/fistf.net/htdocs/wp-content/plugins/code-manager/Code_Manager/Code_Manager.php(172) : eval()’d code:7 Stack trace: #0Thank you Peter for the code.
I copied / pasted and adapted your example.
But, how can I put the shortcode in a post ? This post is used as Static page in WPDA project.
I put the shortcode in the Post body but it is interpreted as text.
[cmruncode name=”Execute query from PHP shortcode”]Oups, it was another error.
Forget my post, sorry !Low priority means available tomorrow???
Yours
RobertRoger??- This reply was modified 3 years, 6 months ago by sturmy31.
Hi Peter,
Default value could be a solution for constant, like a field STATUS with “PENDING” as default, you’re right!
I can’t ask users to fulfil a field in the Excel file (from which they generate the CSV) with their login!
I need to set the field with the real login used ($$USER$$) to import, not a value manually set, for security reasons!
The need is to import data in a shared table by different users.Sorry ??
RogerHi Peter,
The use case is as follows: the national federations must provide the international federation with the list of clubs and the list of players (2,000 players for Italy!). The heads of national federations are often not comfortable with IT tools. So I can provide them with an Excel template file with a macro generating the CSV file in the right format. The idea is that then, all they have to do is upload the CSV file during an import whose mapping has been done beforehand by the administrator, with ideally certain fields of the table filled in with $$ USER $$ variables. for example.
So, as you can understand, importing SQL files is not a solution in that use case.The possibility to use a pre-defined column mapping is THE solution for me. I don’t see a simpler approach.
However, it is not useful to anticipate all cases; importing the same CSV twice on a table with primary keys will cause a “duplicate key” error. The user will have to empty his table to import again, this if the $$USER$$ is possible with import ! I can’t imagine one table per national federation.Thanks
Roger- This reply was modified 3 years, 6 months ago by sturmy31.
Yes ! Exactly, I would like to make import available for non admin users.
- This reply was modified 3 years, 6 months ago by sturmy31.
If I can add one essential element: my goal is that the entire application is stored in the WPDA tables of the database and that no PHP code is added (eg in function.php). So the compatibility of the application with version upgrades is ensured by WP and each plugin without my having to do non-regression tests and modify the code (especially when I will no longer be there to do it …).
Of course I know that features must be adaptated to WPDA capabilities.
- This reply was modified 3 years, 6 months ago by sturmy31.
Hi Peter,
I am not a programmer but just a manager of software engineers. However, I have a university degree in computer science specializing in databases.
Even if I can dig into the solutions you offer me, the context in which I want to use WP Data Access is the implementation of a data management application for an international association (fistf.com) which does not have any resources. competent in programming.
My goal is therefore to set up a “no code” solution, in other words entirely based on the configuration of a WP plugin with simple SQL requests or mass updates.
A typical example is the filling of a form by the national associations each year (insertion of an article in a table) followed by the execution by the secretary of a mass validation process of the forms that he will have checked as valid, which processing consists of copying the articles from one table to another.
For this I only need WP Data Access pages for forms and Queries for mass processing.
So the only lack today is the possibility of creating WP Data Access pages associated not with templates but with Queries.
Like this, I am able to offer a WP Data Access menu on the backend offering the viewing or updating of tables and the execution of SQL query packets.Concerning the before_form and after_form, why not offer the “HTML / Javascript code before” and “HTML / Javascript code after” fields in the page definition form? Ideally fields that can be edited with the WYSIWYG plugin from the WP backend …
Regarding the backend menus, would it be possible to have several levels of submenus? For example using the “\” or “/” character to signify a sublevel in the “Menu Name” field
For example: “Inscriptions\Validation” would give a “Inscriptions” menu and a “Validation” sub-menu`… A letter to Santa Claus!
Let me know.
RogerHi Peter,
Great ! Thanks a lot !
I would like to provide logged users with a set of forms, table views and for some of them, procedures processing to validate set of updates.
This on the backend using the wpda menu.
So, having the possibility to execute queries via the wpda menu would be … my final request!
??
Kind regards
RogerHi Peter,
Wonderful !
Thanks a lot !
Roger