Shortcode to display single fields results
-
Hi Peter,
Firstly thankyou for the truly great plugin, I have setup an app and the backend data administration side is awesome, a real time saver!I have hit a stumbling block however in displaying the public data. First some background:
I have setup 3 tables and 1 view to join the fields in a many-to-many relationship, this is working perfectly.
I have setup a WP php template which uses two $_GET variables which are parsed in the url in order to execute SQL query using these variables. This is how I wish the page to be utlised.
I have published the view and in the table format using the standard shortcode, functionally again this works fine.
The stumbling block is that I wish to display the results in a vertical/column (side-by-side) (1-3 sets will be returned) display eg:
Engineer 1 Engineer 2 Engineer 3
Name: Engineer 1 name Name: Engineer 2 name Name: Engineer 3 name
Phone: Engineer 1 phone Phone: Engineer 2 phone Phone: Engineer 2 phone
Email: Engineer 1 email Email: Engineer 2 email Email: Engineer 2 emailI could potentially do this outside of the WPDataAccess plugin using pure PHP/MySQL however is there a way to achieve this using WPDataAccess?
I appreciate that there is something that I could be missing here and what I want to achieve may be fairly simple, but I’m going about it the wrong way?
I have attempted also to use the WHERE clause within the table, but I guess it doesn’t accept variables for the query (based on the two $GETs)?
The ultimate goal would be to have a shortcode in which I could call in a template eg
[engineer no="1" field="name"] [engineer no="2" field="name"]With this I could sould setup the page using whichever page/template I like.
I have looked into the wpda-cwg-extension in which I may be able to set the $_GET variables for the WHERE clause dynamically, but I would still have the issues with the display?
Perhaps this could be achieved with CSS and/or jquery (not my strong point!)?
If you could please point me in the right direction I would greatly appreciate it!
Thanks
The topic ‘Shortcode to display single fields results’ is closed to new replies.