Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

php problem

  • 05-05-2008 1:13pm
    #1
    Closed Accounts Posts: 179 ✭✭


    this code deosnt seem to print back out the data from my table, any suggestions wud be appreciated


    GLOBAL $bookmark_table, $cell_color;

    $query = "SELECT id, site_name, url, DATE_FORMAT(date_added,'%m-%d-%Y') AS
    date_added, description
    FROM $bookmark_table
    ORDER BY date_added DESC";

    $result = count($id);

    print "<div align=\"center\"><table cellpadding=\"2\" cellspacing=\"1\"
    border = \"0\" width = \"600\">";

    for ($row = $result; $row >= 1; $row-=1) :

    print "<tr><td>";
    print "<b>".$row["site_name"]."</b> | Posted:
    ".$row["date_added"]."<br>";
    print "</td></tr>";

    print "<tr><td>";
    print "<a href = \"http://".$row["url"]."\"&gt;
    http://".$row["url"]."</a><br>";
    print "</td></tr>";

    print "<tr><td valign=\"top\">";
    print $row["description"]."<br>";
    print "</td></tr>";

    print "<tr><td><hr></td></tr>";

    endfor;


Comments

  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    You're not actually executing the mysql query. Set $result=mysql_query($query); and then $row=mysql_fetch_array($result);


  • Closed Accounts Posts: 179 ✭✭mrDuke


    cheers that work a sweet!


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    No probs!


Advertisement