18 Posts
mikikado
9 years ago
5
Topic

Hello there!

I need  a solution to make a query in phpmysql dependic on a value of a Dynamic Selectfield.

What i want to do: User has to make a selection in frontend (Dynamic select field, name eg. "selectfield"). Now shall me looked in the table "mytablename" (phpmyadmin) in column "mycolumntitle" where value of the selectfield is to find and give the value to the fiel "myresultfield".

I can't work with SD Databaser, because it will be used in frontend. Databaser-Typography is usable in contentview. I need this in site-view.....

Thank you for your answers in advance.

Best regards

Michael

Get a VIP membership
15 Posts
Kleber
9 years ago
0
Level 1

Not sure if I understand.

But you can use jquery to automatically fill any field.

Maybe a two pages(steps) solution. First pages has a simple html form with a select field > Second page is seblod form, php gets the value of the first form on address, do the query and jquery fills the field with result.

9 years ago
3
Level 1

Hi Mikikado,

It's not clear. Can you explain more ?

Regards,
Mehdi

18 Posts
mikikado
9 years ago
2
Level 2

Okay. I try to explain on a different way:

SQL: SELECT title FROM #__table_x WHERE $('#selectfield')

MytextField = SQL

This is what I want to do. I am on trying with ajax plus php but not succeeded yet :(

If you have a solution for me I would be gladfull....

9 years ago
1
Level 3

Hi mikikado,

Thanks for your reply.

I think you don't know well the philosophy of SEBLOD and how it works.

For that, i would like to know what you would like to have and not what you want to know to implement in SQL any code.

Regards,
Mehdi

18 Posts
mikikado
9 years ago
0
Level 4

Thank you for your reply Mehdi. Seblod is a "wonder machine" in my eyes. I am on dicovering its possibilities.

What I have and want to do is as fellows:

I have a table with a list of tours. Each has 3 variants of prices. I have a form made with seblod and it shall be filled in frontend.

Depending on selected tour by the "user" in this form shall be shown the price in the text field "#price".

The form shall be usable only in frontend by logging-in. The user shall be not allowed to login in backend.

I couldn't find another solution for my "problem" than using ajax and php to get the prices from phpmyadmin table....

Best regards.

Michael

Get a Book for SEBLOD