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 MX

Options
  • 20-10-2004 10:49pm
    #1
    Closed Accounts Posts: 12


    In Dreamweaver MX there is functionality to use PHP in conjunction with my SQL to dynamically generate tables. Has anyone used this sucessfully?


Comments

  • Closed Accounts Posts: 186 ✭✭roundcrisis


    I can t understand what are you looking for;
    clarification please
    U can use dreamweaver Mx to generate sites with php and MySql,
    to generate a table dinamically in this site you should create a file that contains a php query to create table and then run this query with mysql_query.

    the resulting script would be something like this:


    <?php require_once('Connections/connectioin.php'); ?>
    <?php
    mysql_select_db($database_dbname, $your_connection);
    $query_Recordset1 = "CREATE TABLE `test` (`field1` VARCHAR( 23 ) NOT NULL ,`filed2` VARCHAR( 23 ) NOT NULL )";
    $Recordset1 = mysql_query($query_Recordset1, $your_connection) or die(mysql_error());
    ?>
    <html>
    <head>
    <title>test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>

    </body>
    </html>


  • Closed Accounts Posts: 12 mmurf100


    I sould have been clearer. Instead of putting in all the code to return say a list of products based on a seach string Dreamweaver does it for you.

    In Dreamweaver you Define a site> Then use Window> Databases to specify a database. But this is as far as I have got as it will not find the tables in database after this point.

    I was wondering why this is so.

    Michael


  • Closed Accounts Posts: 186 ✭✭roundcrisis


    because what dm is trying to find is the databases,
    you must deal with the tables in your code

    (for this I asume that you have created a site and set up a proper connection)
    if you want to display the contents of a table you must create a php document then
    go to Application/bindings (or click in windows / bindings) create a recordset
    once you have done that the easies way to display the data is in the php docuemtn drop a table and design the way it will look and then go to application (from the insert menu) and drop a dynamic text, that will open a dialog box, select the field you want to display and so on for all the fields in the table you want to show.
    When you finish this, in the palet next to bindings click on the plus (+) sign and click on repeat region while you have the table that you designed previously selected

    I know this sounds confusing, but its actually really easy (just hard to explain)


  • Closed Accounts Posts: 12 mmurf100


    I have set up the ceoonection correctly. Where I run into problems is where the fact that mX can not see any tables in the database. Is there any reasons that this could be happening (there are tables in the DB)


  • Registered Users Posts: 286 ✭✭fizzy


    this has happened to me before when the login details for my database had changed. dreamweaver still recognised the connection but no tables were visible. if you right click on your connection in the application panel and choose edit/properties and test the connection you can ensure the connection is still actively working...
    you should be able to see all your tables.
    then the general steps involved in making a php/mysql page are to set the document type to php/mysql, then create a recordset (do your query) and then you can insert a dynamic table directly by clicking a button on the application toolbar. it will ask you the recordset to use, the columns you want and will even take care of paging for you.


  • Advertisement
  • Closed Accounts Posts: 12 mmurf100


    what if it never worked.. It never showed me the tables? What would be the cause of this?


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    If it doesn't show you any tables then it probably cannot connect...


  • Closed Accounts Posts: 1 Felicity


    Hello,

    From what I'm finding on the internet, this is a known issue with Macromedia. I guess its also a problem for people using ASP, not just MySQL.

    I'm having this same exact problem. I able to connect to the database successfully, it just doesn't show my tables when I know the database actually contains them.

    If I can find the solution, I'll be sure to post it here. Please do the same for me.

    Felicity


  • Closed Accounts Posts: 12 mmurf100


    As far as i know this works by placing a script on the server that acts as a gateway to read the database. Could it be a host problem that they do not allow scripts on MySql servers?


Advertisement