Php friends status application

Hi Guys
I have social networking application. I am trying to query a database to get the ids of all the users friends.  With the ids of all the users friends I am then trying to  query a second database with  the status feed  that contains all users status data.
I would like to echo the users friends status data only from the second database
code is below hope you can help.
Thank you.
<?Php
session_start();
?>
<?Php
//connect.
include("connect.php");
//Time ago coverting code.
include_once("classes/develop_php_library.php"); // Include the class library
$id=$_SESSION['id'];
/*find-out users friends*/
$findperson=mysql_query("SELECT * FROM friends WHERE sessid='$id'");
$timeAgoObject = new convertToAgo; // Create an object for the time conversion functions
$findfriend=mysql_num_rows($findperson);
//Count if the person has any friends. If they have friends get the ids of all their friends
if($findfriend>0)
while($rati=mysql_fetch_assoc($findperson))
    $fried=$rati['friendid'];
    //query the status table to give the users friends status.
    $mediafeeds=mysql_query("SELECT * FROM status WHERE userid='$fried' LIMIT 0,8");
    $media_num=mysql_num_rows($mediafeeds);
//count to see if their any status updates from users friends.
if($media_num>0)
//display all the users friends status data.
$datamedia="<TABLE BORDER='0' CELLPADDING=8 bgcolor='#FFFFFF' align='center' width='350px' height='30px'>";
while($mini=mysql_fetch_assoc($mediafeeds))
$user_id=$mini['userid'];
$viewer_nme=$mini['username'];
$viewer_picture=$mini['viewerpics'];
$media_pic=$mini['contentpic'];
$desc_ption=$mini['description'];
$date_time=$mini['date'];
$convertedTime = ($timeAgoObject -> convert_datetime($datetime)); // Convert Date Time
$datetime = ($timeAgoObject -> makeAgo($convertedTime)); // Then convert to ago time
//This is just a table with the data of all the users friends data.
$datamedia.="<tr><td valign='top' cellpadding='5' width='10%' bgcolor='#FFFFFF' align='center' >$viewer_nme<br/><a href='friendsprofile.php?uid=$uidd&&viewer=$id'><img src='".$mediapic."' width='80' height='80' align=left></td>
      <td valign='top' align='left' cellpadding='5' width='60%' bgcolor='#D3D3D3' cellpadding='0'>$introduction<br/>$titlenamed$titled<br/>$descd$desc_ption<br/><br/>$date time</td></tr>";
$datamedia.="</TABLE>";
echo $datamedia;
else
echo "<font color='#333333' size='2' face='sans-serif' align=left><div align='center'> Your friends have not current activities.</div></font>";
else

This is the friends table with the id of user and their friends ids and information.
id
friendid
friendname
friendpic
friendage
friendgender
friendcountry
friendcity
sessid
The table above is got all the users friends, sessid is the id of the user and the reset is the friends info of that individual user.
The table below is the status table containing all the users status. userid is the users id and the reset is the past and resent actitivies
id
userid
username
userpics
activity
description
date
My problem is how to get all the friend ids from the friends table  and echo all the past and recent activities  The friends are supposed to be the friends of the current user session.
[Edited by moderator to remove link to CPanel login]

Similar Messages

  • Php-cgi.exe - Application Error when Oracle is connected in PHP

    I am connecting Oracle 10g from PHP 5.0 and my OS is win server2003. I uncommented the following line in php.ini file also.
    extension=php_oci8.dll
    It is connecting the oracle and giving the required result also, but everytime the following error is coming.
    php-cgi.exe - Application Error
    The instruction at "0x6067b97e" referenced memory at "0x0114f020". The memory could not be read.
    Click OK to terminate the program.
    Click CANCEL to debug the program.
    Can anyone suggest to rectify this?

    Are you using a php_oci8.dll that is the right version for the version of php you're using? I know that sounds silly, but sometimes people do that.
    ~Jer

  • Cisco Configuration Professional - Monitor - Traffic Status - Application traffic view

    Installed the Latest version of CCP. Noticed that it use Internet Explorer as the default browser.
    Current issue - Monitor - Traffic Status - Application traffic view show a window that is to large for my current screen,
    I've tried several options to make it more viewable, but no luck.
    Screenshot, Explaining the issue - Notice the difficulty to view the graphs
    Any advice will be appreciated.
    Philip

    I've manage to fix it by changing the zoom on Internet Explorer

  • IDoc: Status: Application document not posted

    Hi Friends,
           I am New to ALE/IDOC.  Based on the ALE_QUICKSTART  documentation. I have tried to send  material from one client to other client. (within system) To do that
    I have created two logical systems and assigned them to corresponding clients.
    Created a RFC destination and assigned logical systems.
    Created Distribution model in sending client.
    Created partner profile in both clients.
    Created Material and send to receiving system using BD10 tcode.
    I checked Idoc status in Sending system, Idoc status is 03-Data is passed to port OK, status 30-Idoc ready for dispatch and  status 01- Idoc generated.
    But in receving system  (Inbound Idoc)- I got status- 51-Application document not posted and Function module not allowed: AFS_RETAIL_ARTMAS_IDOC_INPUT.
    I also checked partner profiles in both systmes- both r same.
    Kindly tell me what went wrong and what should i do.
    Pl.provide answers pertain to this problem only.
    Thanks in advance,
    S.Senthil

    Hi Chris,
            Thanks for ur reply.  I am not using is-retail and I have Generated MATMAS idoc in sending system.
          Kindly provide me answer.
    Thanks in advance,
    s.senthil kumar

  • How do I add an already built Shopping Cart  (PHP and MYSQL) application to a page in a Muse site?

    How do I add an already built Shopping Cart  (PHP and MYSQL) (Cartweaver 4) application to a page in a Muse site? Do I have to export the Muse site as Html to dreamweaver and them use the extension to bring the shooping cart in or can I do it directly in Muse?
    Message was edited by: mgv2048

    We have experimented with doing this with some good success. We have been working on adding Cartweaver to a Facebook page by essentially adding a Cartweaver store to Facebook in an iframe.  The "store" would be pages with just your basic product display, cart, and checkout functionality, with none of the "window dressing" - just use CSS to match the color and general look of the design it's being added to.
    The one problem with this for Facebook is when it comes time to check out toy have to leave Facebook and go to your server where an SSL is in place.  Fortunately in this situation this would not be the case, you can have an SSL installed to the root of your site and you'll be okay.
    This is an interesting project.  Give this a try and let me know how it goes and if you run into any snags, please make a post on the Cartweaver forums: http://forums.cartweaver.com - I'm really confident that this can work, and not only work, but work well.
    Looking forward to hearing how this goes, and being of what help we can.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    PHP & ColdFusion Shopping Cart for Adobe Dreamweaver
    Stay updated:
    http://www.facebook.com/cartweaver
    http://www.twitter.com/cartweaver
    http://blog.cartweaver.com

  • Add Button to GUI STATUS Application toolbar

    Hi,
    I have to add a button in the application toolbar of a gui status. I have done that many times before, but I never got into trouble like this time....
    When I open the Gui status and the tree for the application toolbar, I can see already set buttons. When I now click on change (a modification warning comes) and press the plus-icon, it is possible to enter a new item. But everything I´m typing, I get the message Function code XXXX has not been assigned to a function key. I have never got this before....
    When I now go to SE41 and enter a new function key, I can´t use it either afterwards as a button in the application toolbar.
    In the tree of the function keys, I can´t change anything...
    What can I do here? The program name is SAPMZLCG, so it has been modified sometimes. But how can I change the GUI STATUS now to add a new button?
    Thank you!

    You need to goto the application toolbar and the add your text to the items and click below the text you will get one popup which will ask for static text and dynamic text. select statictext and then add all the information like text name and if you want to add an icon you can do it aswell. the there will be another popup for fuction attributes where you will be able to find some options loke fuction types and reaction need to select all that and then click on the ok button and save check and activate the same and after that activate and check whether the button is visible or not. once the button is visible then you need to check for the ok_code and sy_ucomm and then insert the fuctionality of the button.
    I hope this might solve your problem.

  • ..... PHP oracle.. application connectivity issue.......

    all.
    We have oracle 9i release 2 databse installed and acced by clients using Forms 6i.
    Due to some reasons we are shifting to Oracle 10g rel 1 and PHP as front end.
    The new server machine has windows 2000 professional with service pack 4.
    i installed orcl 10g rel1 on it. I configured the PHP and place the application pages on the folder and it is workign fine.
    Now the problem is that when i try to access the application from my computer it shows me the error as
    "Database connection error." This error is hardcodded by me , if there is any issue in connectivity , i have hardcoded that my user will see this error.
    a few of the clients when they type the machine name on thier browsers see this error
    " PHP Warning: Unknown(): Unable to load dynamic library './extensions/php_oci8.dll' - Access is denied. in Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library './extensions/php_oracle.dll' - Access is denied. in Unknown on line 0 "
    My database clients werent also connecting but the following action has caused the fault to be corrected.
    wat i did was that i replace the
    host=(endsys.eapa.com)
    to host= (ip address).
    But still i am unable to connect to the application via my webbrowser.
    I have installed PHP correctly, IIS correctly,
    may b there is anything to do with the permissions.
    Kindly suggest something so that i may able to bring up the application
    Regards

    Hi: Im running IIS on a Windows Server 2000, PHP Version 4.4.2 and I have installed on the same server my Oracle 9 DB.
    I have edited php.ini like:
    extension_dir = "C:\PHP4\extensions"
    extension=php_oci8.dll
    I have run dependency walker in order to ensure all dependencys are ok.
    I have granted full access to Everybody to the PHP directory
    But im having the following error:
    PHP Warning: Unknown(): Unable to load dynamic library 'C:\PHP4\extensions\php_oci8.dll' - Access is denied. in Unknown on line 0
    Does anybody know where i should start troubleshooting this?
    Thanks, Lautaro Dolberg

  • PHP/Oracle Web Application Framework

    Hi,
    for people hopping on the Oracle/PHP bandwagon, there's a PHP object oriented Web Application framework that supports Oracle 8.0.5, Oracle 8i, 9i and 10G.
    It's called 'Achievo ATK' and can be found on http://www.achievo.org/atk
    It makes developing a webinterface to an existing Oracle database pretty easy. It boils down to creating PHP classes around the tables, defining the relationships, and an application to manipulate the data (crud) is generated dynamically by the framework.
    To give an example, a complete employee administration application for the 'emp/dept' tables from the scott schema is as much code as:
    <?php
      userelation("atkmanytoonerelation");
      class employee extends atkNode
        function employee()
          $this->atkNode("employee");
          $this->add(new atkAttribute("empno", AF_AUTOKEY));
          $this->add(new atkAttribute("ename",
                                        AF_SEARCHABLE));
          $this->add(new atkManyToOneRelation("deptno",
                             "scott.department",
                             AF_SEARCHABLE));
          $this->setTable("emp");
    ?>
    <?php
      class department extends atkNode
        function department()
          $this->atkNode("department");
          $this->add(new atkAttribute("deptno", AF_AUTOKEY));
          $this->add(new atkAttribute("dname",
                                    AF_SEARCHABLE));
        function descriptor_def()
          return "[dname]";
    ?>The demo application that can be downloaded contains basic emp/dept examples, including the ability to edit a departments employees etc. A slightly different version (including manager link etc.) of the dept/emp example can be found on http://www.achievo.org/atk/demo, lesson 2 in the demo's menu.

    Thanks for letting us know.
    -- CJ

  • PHP MysQL Background Application

    Has anyone used PHP / MySQL / ADDT to develop a background application that is clocked based?  Essentially, I'm just looking to fire off a stored procedure every "n" minutes.  Is there a way to write / configure an app to do this?

    Hi Jim,
    Are you looking to have it trigger every so many minutes while the page is open or completely in the background?
    Completly in the background:
    You might want to add a cronjob that runs the php script every so many minutes.
    or
    While page is open:
    You can set a meta-refresh to run every so many minutes so it refreshes, re-runs the script/page that is open.

  • Recommend PHP/MySQL Utility Application

    To save time, I am looking to purchase an application development software / toolbox compatible with php / mysql.  One of the functions I am looking for is a php file upload via form upload script. I know that DMX zone has separate program they sell.  Ideally, I would like a tool that does more than just one function and not with a high price tag.
    If you could recommend some products, it would be appreciated.
    George

    When it comes to using a reasonably priced "no additional coding required" PHP/MySQL code generation software, I´ve always been very pleased with PHPMAKER -- however it should be mentioned that there are lots of other tools out there as well which might suit your needs better than this one, so just google for "php code generator" to get a general idea on what´s available.
    Cheers,
    Günter

  • Hosting a SaaS PHP/MySQL web application

    Hi
    I am building a PHP web application ( to be used by about 5 customers ) with MySQL database using partitionning strategy for scalabilty purpose.
    Customers list can grow up to 100, so I pre allocated 100 partitions for the MySQL database.
    Can I host my web app on Window Azure?
    If yes, what pricing plan should I choose to start my business? (I mean Server requirement : Memory, number of core, espace disk)
    Is MySQL partitionning a good strategy for such app?
    Thank
    Have a nice day

    Hi,
    Please have a check on the below article to get you started.
    http://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/
    Regards,
    Mekh.

  • For uploading PDF (in php) if (!=application/pdf) {"No PDF"} gives error when trying to upload PDF. Why?

    In a php upload file I have inserted:
    if($_FILES['file']['type'] !="application/pdf"){ echo "Should be PDF";}
    exit;
    Even when trying to upload a PDF file the error message comes: Should be PDF.
    Earlier this worked fine. Maybe a bug in an update?
    Regards,
    pluys

    I think I found part of a solution now. It is not Firefox, it is some add-on or plug-in. I myself use a lot of add-ons. I asked someone who was new to Firefox to load up a PDF file. There was no problem!
    So now I'm going to check all my add-ons, hoping it is not Firebug.
    All the best,
    Pluys

  • Status application in Red

    Hello,
    I installed OAS 4.0.8.2, I have created an application with the cartridge, and I have created a stocked procedure. when I want launching, I always have the statute of the application in red. I don't arrive to put it in green. can you help myself and thank you for advance.

    Hi,
    Yes, the issue was solved and I can monitor all components in the WLS 10.3.
    To achieve that, I did the following adjustements:
    1. Open the command line and check if the WLS environment is set correctly. In “C:\Oracle\Middleware\wlserver_10.3\server\bin”, execute “setWLSenv.cmd”.
    2. Check JDK versión. In the same path, execute “java – version”. Verify JDK is greater than 1.6.0_05.
    3. Create an Oracle WebLogic Server Domain for Oracle ADF.
    I hope it helps.

  • All Game Center friends' status says "Never Played" and not be updated after restoring iphone

    I restored my iphone today, and after that, recent game activity line of all of my friends on my game center friends list shows "Never Played" and has not been updated.
    Is there anyone saw this issue and found any solutions?

    added more description as below:
    Just in case, the following is what I did/saw :
    1. I already upgraded ios 5.1.1 and there's no problem about Game Center before restoreing ios.
    2. I restored ios(iphone 4s) via iTunes ( ver. 10.6.1.7) on windows pc
    3. After finishing the restore (I tried it with  both backup and as-new-setup), launch Game Center app and log-in as my Game Center ID
    4. Open "Friends" tab and see the friend list on the left of the screen
    5. See description below all friends' name shows "Never Played"
    I tried log-out and re-login Game Center, but this wasn't fixed.
    I feel very sad to see my Game Center ID looks broken.
    But I'm also guessing this issue comes from Game Center's server side, because this worked fine before restoring ios.

  • Plugin-friendly Java applications

    Hi all,
    I have been trying to research making a web application that is mostly Java-driven that will be able to accept plug-ins that are written for it. Specifically it is written from appfuse, if that is of further help. Has anyone done something similar to this in Java and have any tips or helpful online resources on the subject? I'm having a really tough time finding assistance with this online, considering most sites are either advertising plug-ins or talking about making the plug-ins themselves for application X...not making application X :) Any assistance is greatly appreciated.
    Thanks

    Look at the Bean Object.

Maybe you are looking for

  • How to create a Web Dynpro Project from Downloaded zip file?

    Hi, I have been working in Java Web Dynpro for last 1 month but not able to create any Web Dynpro from Downloaded zip file? Can anybody tell me how to create a Java Web Dynpro Project from Donloaded zip code? Regards Kaushik Banerjee

  • Print settings change in Win7 64bit.

    My wifes computer a dell quad core. Running win7 64 bit. We have an MG8120. I can set the print settings paper size, orientation, business or personal... I come back to those settings a day later and they are changed. Even though I set the always pri

  • How do I home share my iTunes number?

    I now have an Apple TV and I want to use my iTunes card to rent a movie.  How do I do that? 

  • Error: State cannot be saved as variables are not submitted in WAD (Portal)

    Hi Gurus, I am getting the following error : After opening the report and selecing the free characteristics if I want to go back one screen by right click(context menu)-> Back->Back one Navigation Step it is throwing the following below short dump in

  • Itunes 7.1 not working with my keyboard

    I have a G15 keyboard and when I push play when it is minimized it will not play I have to hold the button down to let it play and when i let go it stops, same goes for when i try and press stop. Does anyone else have the problem and if so did you fi