Joomla userid

Discussion in 'PHP' started by Riceman1000, Oct 2, 2012.

  1. #1
    Hi,
    I am working on a Joomla system where each user has an "id". The database is the same for both tables. (Joomla Users and the Client List)

    I have a custom page that is pulling data from fields in a row. The row is in a table(Client List) that has multiple rows. Each row has a column call "jm_id".

    Ideally I want the info displayed on the page to ONLY show the data from the row where the Joomla users "id" matches the "jm_id".

    Any help would be greatly appreciated to this php beginner.

    Here is part of the code I have on the page(i have successfully connected to the db and am manually stating which row to pull the data from) :
    <?php
        $query = "SELECT listing_1, listing_2, listing_3, listing_4, listing_5, listing_6, listing_7, listing_8, listing_9, listing_10, listing_1_name, listing_2_name, listing_3_name, listing_4_name, listing_5_name, listing_6_name, listing_7_name, listing_8_name, listing_9_name, listing_10_name FROM j25_Client_List WHERE id = 94";
        list($listing_1, $listing_2, $listing_3, $listing_4, $listing_5, $listing_6, $listing_7, $listing_8, $listing_9, $listing_10, $listing_1_name, $listing_2_name, $listing_3_name, $listing_4_name, $listing_5_name, $listing_6_name, $listing_7_name, $listing_8_name, $listing_9_name, $listing_10_name) = mysql_fetch_row(mysql_query($query, $dbh1));
        ?>
    Code (markup):
     
    Riceman1000, Oct 2, 2012 IP