Jump to content

Search the Community

Showing results for tags 'conditionals'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Is this code correct. If there's an errors or a better way of writting this can you please say? $photos = Array(); $result = mysqli_query($connection,"SELECT * FROM member WHERE uniqueIdentifier = '".$_POST['deviceID']."' AND currentDate = '".$_POST['matchDate']."'"); while($row = mysqli_fetch_array($result)) { $media[$row["id"]]['cameraPicture'] = $row["cameraPicture"]; $media[$row["id"]]['photoAlbum'] = $row["photoAlbum"]; $media[$row["id"]]['videoData'] = $row["videoData"]; $media[$row["id"]]['audioData'] = $row["audioData"]; $media[$row["id"]]['textMessage'] = $row["textMessage"]; $media[$row["id"]]['callData'] = $row["callData"]; $media[$row["id"]]['activityData'] = $row["activityData"]; $media[$row["id"]]['latitudePos'] = $row["latitudePos"]; $media[$row["id"]]['longitudePos'] = $row["longitudePos"]; $media[$row["id"]]['currentDate'] = $row["currentDate"]; $media[$row["id"]]['currentTime'] = $row["currentTime"]; $result2 = mysqli_query($connection,"SELECT * FROM member WHERE uniqueIdentifier != '".$_POST['deviceID']."' AND currentDate = '".$_POST['matchDate']."' OR latitudePos BETWEEN '".$_POST['latMin']."' AND '".$_POST['latMax']."' AND longitudePos BETWEEN '".$_POST['longMin']."' AND '".$_POST['longMax']."'"); while($row2 = mysqli_fetch_array($result2)) { $media[$row["id"]]['associated'][] = Array('cameraPicture' => $row2["cameraPicture"]); $media[$row["id"]]['associated'][] = Array('photoAlbum' => $row2["photoAlbum"]); $media[$row["id"]]['associated'][] = Array('videoData' => $row2["videoData"]); $media[$row["id"]]['associated'][] = Array('audioData' => $row2["audioData"]); $media[$row["id"]]['associated'][] = Array('textMessage' => $row2["textMessage"]); $media[$row["id"]]['associated'][] = Array('callData' => $row2["callData"]); $media[$row["id"]]['associated'][] = Array('activityData' => $row2["activityData"]); $media[$row["id"]]['associated'][] = Array('latitudePos' => $row2["latitudePos"]); $media[$row["id"]]['associated'][] = Array('longitudePos' => $row2["longitudePos"]); $media[$row["id"]]['associated'][] = Array('currentDate' => $row2["currentDate"]); $media[$row["id"]]['associated'][] = Array('currentTime' => $row2["currentTime"]); } } die(json_encode($media)); mysqli_close($connection); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.