Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: PHP Code help please

  1. #21
    Join Date
    Jun 2003
    Location
    Launceston, Tasmania
    Posts
    12,347
    Total Downloaded
    0
    they are a pain aren't they!!!

    http 500 error now DOH!!
    1994 Discovery TDi
    2004 Discovery 2 TD5
    2010 Discovery 4 TDV6
    1961, Series 2 Ambulance. 108-098 - Eden

    Registry of Ex Military Land Rovers Mem. 129
    Defence Transport Heritage Tasmania Member

  2. #22
    Join Date
    Apr 2009
    Location
    Cairns, QLD
    Posts
    115
    Total Downloaded
    0
    Think i got the fix for it all hahaha (famous last words) once again silly " go back to the code from a while back (should just be copy and paste and see the fix in red.

    Cheers
    Josh

    Quote Originally Posted by Phoenix View Post

    //connect to the database
    $dbhandle = mysql_connect($hostname, $username, $password)or die("Unable to connect to MySQL");
    //select a database to work with
    $selected = mysql_select_db($dbname,$dbhandle) or die("Could not select examples");
    $result = mysql_query("SELECT membership.membership_no, membership.name_public, membership.state"
    . " FROM membership ");
    //fetch tha data from the database
    echo "<center><table width=600 border=0 cellspacing=8 cellpadding=0>";
    while ($row = mysql_fetch_array($result)) {echo "
    <tr bgcolor=#CCCCCC>
    <td colspan=4>REMLR No. ".$row{'membership_no'}."
    </td>
    </TR>
    <TR>
    <td colspan=4>".$row{'name_public'}."
    </td>
    </TR>";
    $result2 = mysql_query("SELECT arn.ARN, census.census_short, arn.vehicle_name"
    . " FROM arn INNER JOIN"
    . " mem2arn ON arn.ARN = mem2arn.ARN INNER JOIN"
    . " census ON arn.census = census.census RIGHT OUTER JOIN"
    . " membership ON mem2arn.membership_no = membership.membership_no"
    . " WHERE mem2arn.membership_no = " . $row{membership_no}
    . " ORDER BY arn.ARN");
    while ($secondrow = mysql_fetch_array($result2)) {echo "
    <tr>
    <td width=150>&nbsp;
    </td>
    <td>".$secondrow{'ARN'}."
    </td>
    <td> -
    </td>
    <td> ".$secondrow{'census_short'}. "
    </td>
    </tr>";
    }
    echo"
    <TR>
    <td colspan=4 align=right>".$row{'state'}."
    </td>
    </TR>";
    }
    echo "</table></center>";
    ?>

  3. #23
    Join Date
    Jun 2003
    Location
    Launceston, Tasmania
    Posts
    12,347
    Total Downloaded
    0
    You are a LEGEND my friend, it works!!!!!!!!!!!!!
    1994 Discovery TDi
    2004 Discovery 2 TD5
    2010 Discovery 4 TDV6
    1961, Series 2 Ambulance. 108-098 - Eden

    Registry of Ex Military Land Rovers Mem. 129
    Defence Transport Heritage Tasmania Member

  4. #24
    Join Date
    Apr 2009
    Location
    Cairns, QLD
    Posts
    115
    Total Downloaded
    0
    No problems a pleasure to help

  5. #25
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    4,656
    Total Downloaded
    0
    Quote Originally Posted by josh aka sean View Post
    No problems a pleasure to help
    I have let the thanks button do the talking.

    Good on you for pitching in!
    [B][I]Andrew[/I][/B]

    [COLOR="YellowGreen"][U]1958 Series II SWB - "Gus"[/U][/COLOR]
    [COLOR="DarkGreen"][U]1965 Series IIA Ambulance 113-896 - "Ambrose"[/U][/COLOR]
    [COLOR="#DAA520"][U]1981 Mercedes 300D[/U][/COLOR]
    [U]1995 Defender 110[/U]
    [SIGPIC][/SIGPIC]

  6. #26
    mikehzz Guest

    Good one Josh

    Sorry, I have been away all day so couldn't follow up on my first post.
    Well done Josh, thats exactly what I meant. Thanks for taking the time to untangle the queries.

    Mike

Page 3 of 3 FirstFirst 123

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search AULRO.com ONLY!
Search All the Web!