Android PHP and HTTP Communications

Asked 2 years ago, Updated 2 years ago, 47 views

I am currently communicating with Android by uploading PHP files on the web server.

ANDROID <-> PHP <-> MYSQL

When there is a table 'user_record' in the DB that stores members' records

There are five records with the ID user_1 There are three records with the ID user_2.

Then if user_1 logs in and looks at his records, The way I implemented it now is to search the table 'user_record' regardless of user and upload a php file to the web server that makes the data in json form, and then on Android, I only parse the id with user_1 to extract the record.

I think the blog address you referred to would be more convenient than uploading the source code. It's pretty much the same. Enter data: http://webnautes.tistory.com/828 Data inquiry: http://webnautes.tistory.com/829

(Refer to this blog to enter and view data.)

Since it's user1 on Android, I think it's more efficient to send only the records of user1 on the server if you send the records of user1. Now that I have brought all the information I don't need, I think it would be too inefficient if there were more records and more members.

Question) If you look up the information, you can send the current user_id and set the condition with user_id when querying the db table at php, is this the right way? If it's the right way, can I send the data when I request it and get it in json form at the same time?

(php was first encountered while communicating with HTTP.)

android php

2022-09-22 21:32

1 Answers


2022-09-22 21:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.