Error message is:

Warning: MySQL Connection Failed: Access denied for user: 'ODBC@localhost'
(Using password: NO) in kd_admin.php on line 12

Warning: MySQL: A link to the server could not be established in
kd_admin.php on line 12
MySQL Error:

I got upper error trying to execute following code:


    function prikazi_listu($tablica) {
        $data = mysql_query("SELECT * FROM $tablica");
        if(!$data) {
                echo("MySQL Error: " . mysql_error() . "<br>");
                return 0;
        if(mysql_affected_rows()==0) {
                echo('Nema podataka.<br>');
                return 0;

        while ($data_row = mysql_fetch_array($data)) {
            for($i=1; $i<count($data_row); $i++) {
                echo($data_row[$i] . " ");

        return 1;


The connection has already been established, and some data read from
database without problem. The connection was not closed, rather left alive.
Why this happens when I try to execute additional query? Help, anyone!


PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to