Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default connecting mysql

    im having trouble viewing any results from my db,
    ive recently switched to a mac and have it all running locally, i have no
    trouble accessing the db through terminal command line and can see dbs and
    tables and run the queries from here also can see db from phpmyadmin and run
    queries from there but i just cant access any db from a php script ... i dont
    get any error messages just nothing and my tables wont show up in dreamweaver
    which says the path to the server is wrong but the normal php scripts run which
    dont involve mysql what is going on ! heres a clip of code
    <?php
    $host="localhost";
    $username="root";
    $pass="jlkj99";
    $database="hayesdec";
    $tablename="login";
    $connection=mysql_connect($host,$username,$pass);
    if(!$connection({
    echo"no con";
    }
    $result=mysql_select_db($database)
    if($result({
    echo"pppppp";
    }
    $query="SELECT * from" .$tablename";
    $result= mysql_query($query);
    if(!$result({
    echo"no result";
    }

    while ($row=mysql_fetch_array($result))
    {
    echo row["username"];
    echo row["password"];
    }

    ?>
    thanks chris

    dummmmmbo Guest

  2. Similar Questions and Discussions

    1. problem connecting from cf 6.0 to mysql 5
      Hey guys, Heres my problem I can't connect to mysql after i upgraded to v5 it says: Connection verification failed for data source: eval...
    2. Connecting to MySql
      I have installed MySql on a Windows 98 workstation. I start the service with the command: mysqld I can connect to the database and see tables,...
    3. Connecting to MySQL 5.0, How?
      Hi, I run everything on my local machine that is WIN XP SP2 with IIS, Coldfusion MX7.0 I just installed MySQL5.0, the service is running and can...
    4. Connecting with MySQL
      How I do to connect the ColdFusion with MySQL? I read http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=6ef0253 page, but it doesn't works...
    5. Connecting to MySQL 4.1
      OK I am trying to create a DSN for a MySQL db. I have followed this tech note:- ...
  3. #2

    Default Re: connecting mysql

    Try my MySQL database connection guide at:

    [url]http://www.dreamweavermxsupport.com/index.php?type=article&pid=60&sid=61[/url]


    --
    Gareth - TMM Dreamweaver
    [url]http://www.dreamweavermxsupport.com/[/url]
    [url]http://www.garethdp.com/[/url]

    PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
    [url]http://www.phploginsuite.co.uk/[/url]

    Co-Author: Dreamweaver MX: Instant Troubleshooter - Apress
    Co-Author: Practical Intranet Development - Apress
    Co-Author: Dreamweaver MX: Advanced PHP Web Development - Apress
    Co-Author: Dreamweaver MX: PHP Web Development - Wrox


    gareth Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139