×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: MySQL fields

MySQL fields 10 years 2 months ago #25112

  • A Heng
  • A Heng's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Hi, Here's my dilemma.
I know I can download all my entries via the CSV download feature; however I create reports using ARI Tables to pull field data from the MySQL database of my hosting server so I can have real time updates appear for reports online using ARI Tables Module. Student Volunteer Form
I can pull all the single fields in single column; however the custom fields I created in my form treated them as one field of data
eg:
newfields
17::10;34::;11::;19::;20::;21::;22::;23::Not_Applicable;24::;33::;25::yes;26::;27::;28::Football;29::Kyle Simmons;30::;31::;32::;16::;

Is this intentionally done when an entry is made to have all the data sit in one field called newfields?
Is there an SQL command/function that I can use to be able to split the data into new separate columns in my reports.
Here's my current SQL statements required in the ARI Table Module:
SELECT
`name`,
`email`,
`bookingdate` as "Record Date",
`grade`,
`comment`,
newfields as "Custom Fields"
FROM `jml_matukio_bookings`
ORDER BY name ASC

Thanks

MySQL fields 10 years 2 months ago #25115

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi,

because the form is dynamic all new fields are saved in one column (newfields) - Separator is ; Rest is normal key :: value (e.g. booking field id :: filled value).

Hmm would not be easy to split with MySQL - we use PHP for that. In one of the next versions we plan to switch to JSON decoded data for the newfields.

Best regards

Yves
  • Page:
  • 1
Time to create page: 0.128 seconds