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

Dreamweaver CS5 and mySQL

Options
  • 27-11-2010 12:30am
    #1
    Registered Users Posts: 2,089 ✭✭✭


    Relative newbie with a major problem - trying to load a database in dreamweaver CS5 which connects ok, trouble is no tables appear, but exist in the database according to phpmyadmin. Any ideas what could be causing this? Thanks in advance...


Comments

  • Registered Users Posts: 894 ✭✭✭Dale Parish


    I think the best thing you can do at the moment is post the code you are using to display the tables so we can see what is up with it.


  • Registered Users Posts: 2,089 ✭✭✭henryporter


    Hi Dale,

    I've attached the code as a text file. Funnily enough I don't see any reference to the database in there. Also attached is a screengrab of the current sad state of play.

    Many thanks for any help you can give


  • Registered Users Posts: 894 ✭✭✭Dale Parish


    Yeah there is nothing in there that has to do with databases.
    If you are only going to show results from a simple db then something simple like this will suffice.
    <?php
    $con = mysql_connect("yourhost","youruser","yourpass");
    mysql_select_db("database_name");
    $query = mysql_query("SELECT * FROM tablename");
    $row = mysql_fetch_array($query);
    echo "<table border='0'>";
    $i = 0;
    while($i < $row = mysql_fetch_array($query))
    {
    	echo  "<tr><td>" .$row['column_name']. "</td>" ."<td>" . $row['column_name']. "</td></tr>";
    	$i++;
    }
    echo "</table>";
    ?>
    


  • Registered Users Posts: 2,089 ✭✭✭henryporter


    Found out the problem: User privileges or rather the lack of them! Thanks anyhow for the help.


Advertisement