1. C

    Remote mysql server access

    I have a mac computer and I run "xampp" my sql server on it. It works great locally but I want to access it from lets say my iPhone thats use 3g connection. I'm using the external ip of my computer but don't get to the sql server. I opened the 3306 port I'm my router but still doest work...
  2. V

    Get data from two tables and collect them in array and count rows of one table result

    I had two tables named fixture_list and OneRecord where fixture_list has 3 columns named Team1, Team2, player whereas OneRecord has columns like Team1, Team2, id, status so here I want to select all the data of fixture_list and put them into array whereas I want to count the number of rows based...
  3. R

    Laravel Sorting user collection based by distance

    public function nearby() { $user = auth()->user(); $lat = auth()->user()->latitude; $lon = auth()->user()->longitude; $radius = 3; // km => converted to meter $angle_radius = (float)$radius / ( 111 * cos( (float)$lat ) ); // Every lat|lon degree° is ~ 111Km $min_lat =...
  4. K

    Nested queries in MYSQL and nodejs Async Issue

    I want to execute an sql query for every row of another query so i wrote a function like export function getLocations(req, res) { let appData = []; const database = new Database(); database.query('select * from districts') .then(rows => { rows.forEach(row => { const...
  5. P

    How to allow php files to only be called by site, not Inspect Element or by URL

    I have a lot of php files updating my database, but I want these to only work when called in my code (usually by ajax). Now, if I put the URL of the php file, it updates the database, and if I put ajax code in inspect element, the database updates. I don't want people messing around with...
  6. S

    Cần lọc dữ liệu trong mysql với mảng dữ liệu

    Mình cần phải lọc dữ liệu từ danh sách mảng. Mình đã hiển thị kết quả dữ liệu "2". Làm thế nào thì mình có thể nhận được output trong dữ liệu mysql?