Jump to content

Search the Community

Showing results for tags 'inboox'.

  • 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. hello i did a php message system where it get data from sql and it extracts the message that the person wrote you, but is separated into conversations so in the inbox i want it to show only the last message shown, witch it works ONLY for the first person that sends you a message not for the other persons that send you messages so i made a data base where conversation_hash is unique and you it has ids in string separated by a "," <?php $b = mysql_query("SELECT * FROM conversations"); while($a = mysql_fetch_array($B)){ $hash = $a['conversation_hash']; $ids = $a['ids']; $ids = explode(",", $ids); if(array_search($id, $ids) == true){ $ids = array_filter($ids, 'strlen'); foreach($ids as $o){ if($o !== $id){ print_r($ids); echo $o; $y = mysql_query("SELECT * FROM messages WHERE conversation_hash='$hash' AND from_id='$o' ORDER BY message_id DESC "); $t = mysql_fetch_array($y); ?> <div class="message"> <center> <table width="600"> <tr> <td width="75" rowspan="2"> <img src="/elitequorum/<?php echo $t['image_location']; ?>" height="75" width="75" /> </td> <td height="39"> </td> <td height="" rowspan="2"> <table height="75"> <tr> <td width="450" style="vertical-align:middle;" height="55"> <?php echo $t['message']; ?> </td> </tr> <tr> <td style="text-align:right; vertical-align:bottom;" height="5"> <?php echo $t['date']; ?> </td> </tr> </table> </td> </tr> <tr> <td width="75" height="34"> <?php echo $t['username']; ?> </td> </tr> </table> </center> </div> <?php } } } } ?> to do some testing if the information is getting where is suppost to i did some print_r(); and the information does go but it doesnt go in the SQL as a loop, i dont get any PHP/SQL error but the script is not working correctly, this is what i get: ---------------------------------------------------------------------- image1| Message1 | date2 | ----------------------------------------- broken(image2)| empty(message2) | empty(date2) | ---------------------------------------------------------------------------------------- And this is what im suppos to get: ---------------------------------------------------------------------- image1| Message1 | date2 | ----------------------------------------- image2| message2 | date2 |
×
×
  • 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.