• Resolved mbjepsen

    (@mbjepsen)


    Now that I have my CSS problems solved, the next problem comes up.

    I have a total of around 180000 photos uploaded to my site and I have managed those via a MYSQL database. It is totally impossible to upload this amount of media in wordpress.

    I have a table with 3 colums:

    stempel,
    Dorklaring,
    foto

    In order to save space and to allow me to upload my photo anywhere I want, the column foto only contains the filename (ie. img34567.jpg), nut no data about the location (path) for this photo.

    The way I have managed this in the past is to “concat” the paths into the column in the select statement. For instance:

    SELECT stempel, Dorklaring, concat("Https://www.arma-dania.dk/uploads/tyske_stempler/", foto) AS foto

    I have tried (with no success) to do a similar thing in WP Data Access.

    I thought I could do it in the select columns field, But it will not accept the concat statement.

    There must be a smart way of doing this?

    • This topic was modified 5 years, 9 months ago by mbjepsen.
    • This topic was modified 5 years, 9 months ago by mbjepsen.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @mbjepsen,

    Are you doing this in the Data Publisher or Data Projects?

    If you want to use a sql function in your query, you can create a view and then use your view instead of your table in the Data Publisher. You can also use a view in Data Projects, but you will not be able to update your view data. Inserts, updates and deletes are only supported for tables.

    Does this help?

    Best regards,
    Peter

    Thread Starter mbjepsen

    (@mbjepsen)

    I have been doing this in PHPRunner in the past. I am exploring if it is possible for me to use WP Data Access instead.

    I fixt this with a View using MYSQL Workbench

    Thanks Peter, topic resolved.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to change the select statement’ is closed to new replies.