MYSQL Database Filter Issue

I Want Data By Both Means If Id = 1234 And Type = Ac Then Get All Data Of Date And Coch

Ok its very simple u can run tbis query

Select * from (here u have to put table name without brackets ) where id =(here id value) and Type = (here type value) ;

Anf if u also want to order data then u can use
Order by statment like this

Select * from (here u have to put table name without brackets ) where id =(here id value) and Type = (here type value) Order by id Desc;

Ley me know if it is exactly what you want?!!

Edit i made a litte change in my query please check it out

Select date,coch from Table where id=1234 and type =Ac order by Id,Date

1 Like

It Is Working On SQL Database , Can You Please Tell Me How To Get These Data Using Deep-host MYSQL Extension

I didn’t use that extension but if u can share image of its run query block then it becomes easy for us to help you

suggestion

Don’t use his extension instead of it use
This
App Inventor Tutorials and Examples: MySQL | Pura Vida Apps

1 Like

Run Query Is Not Working In Deephost Extension

1 Like

So don’t use that

Use this
https://puravidaapps.com/mysql.php

Its very easy to use and highly customizable queries can be run easily
After using this u will be surprised that its even more easier thsn deephost extension

1 Like

Ok Trying To Use it

1 Like

Wish u best of luck,

Dear, The deep host extension sends SQL commands to the PHP script. And any other extension that may be created for Relational banks, will have to use commands like the one I gave you. That command I gave you has to work. If it doesn’t work on that extension, either you did something wrong or the extension has bugs.

1 Like

Are You Sure It is Secure ?
How To Show Data In List ?

Hmm its same as deephost extension
After getting response from web data will be in row csv table format u can show it using slect list item from list and by using list from row csv text blocks with relative index

edit

Here is an example u can try

There are example blocks on the website.
https://puravidaapps.com/mysql.php

1 Like

Actually My Question Was Not Cleared As I Want here I Try To Clear It…

First You Should To Look My DataBase Structure
Tabel Name Is CochData

Id Coch Type Date
1234 43 AC 24/06/2020
4321 52 Sleper 22/06/2020
1234 31 AC 21/06/2020
4321 11 AC 22/06/2020
1234 17 Sleeper 21/06/2020
1234 15 General 24/06/2020
4321 70 Sleper 22/06/2020
1234 65 General 21/06/2020

Here Is User 123 Has Booked 4 Tickets And It’s Different Type Of Tickets , 2 Tickets Are AC And 2 Tickets Are General And 1 Ticket Is Sleeper

I Want To Show These Data Into List With Different Arrangement Called

AC Sleeper General

In My List I Want To Show Date And Coch Number Of 1234 User Booked Tickets

Which is Better ?
  • Should I Call All Data By User Id And Type ?
    Ex… Select Date,Coch from CochData where Id=1234 and Type ='AC'

  • Should I Call All Data Of User ID ?
    Ex… Select * from CochData where Id=1234

In Both Conditions How To Implement In List

Following is better

And after getting data you have to separate all lists mean date, type and coch and then run if then conditions if in list it has Ac then show it in AC list but if it has Sleeper then show it in other list

This is another topic…
Remember that the ideal is to bring only the fields that we want. The Select * option will bring up all fields. In this case, there are few, but in other cases, it must bring only what we really want.

So We Need To Run Query At 3 Three Time Fro Different 3 Data List , It’s Load On Server is It ?

No you just have to run it one time all other calculations should be done with in app

Each query (Select command) should be done as many times as necessary. - if you need to know the information for an ID (a search) - if you need to know information on a date (another survey) - if you need to know information about a data type (another search). Remember that each of the searches above will be performed according to your need. When clicking on an X button for example, perform search 1 …

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.