[PHP-DB] Need Help in error msg

2010-05-18 Thread nagendra prasad
Hi All,

I am getting this error while tried to run a downloaded script in WAMP:

[1045] dbconn: mysql_connect: Access denied for user 'root'@'localhost'
(using password: YES)

Dose anyone know what exactly this means.

Best,
Guru.


Re: [PHP-DB] Need Help in error msg

2010-05-18 Thread Chaitanya Yanamadala
it means the root user password which u are using is the wrong one..

Chaitanya



On Tue, May 18, 2010 at 12:49 PM, nagendra prasad
nagendra802...@gmail.comwrote:

 Hi All,

 I am getting this error while tried to run a downloaded script in WAMP:

 [1045] dbconn: mysql_connect: Access denied for user 'root'@'localhost'
 (using password: YES)

 Dose anyone know what exactly this means.

 Best,
 Guru.



Re: [PHP-DB] Need Help in error msg

2010-05-18 Thread Artur Ejsmont
May also be granted rights to login from '%' which will resolve to any host
name except localhost.

On 18 May 2010 08:24, Peter Lind peter.e.l...@gmail.com wrote:

On 18 May 2010 09:19, nagendra prasad nagendra802...@gmail.com wrote:
 Hi All,

 I am getting t...
It means that either the password you're using is wrong or the user
doesn't have access to the DB server (the user doesn't exist or
doesn't have the proper rights).

Regards
Peter

--
hype
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
/hype

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] MySQL: Creating a database with

2010-05-18 Thread Alexander Schunk
Hello,

i want to create a database with php.

A look in the php manual says that you need a special 4.x MySQL
version for using
mysql_create_db().

I am getting error message: Call to undefined function mysql_create_db().

When is this function defined and in what version of MySQL?

yours sincerly

Alexander Schunk

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] MySQL: Creating a database with

2010-05-18 Thread Artur Ejsmont
You probably miss the mysql extension or have different one than you are
calling.

Please call
?php
php_info();
?

in script to see what extensions are loaded. if there is some other module
supporting mysql just use different way to run sql.

otherwise you need to look into php.ini and see if module is available and
activate it. If you dont have one and you are on debian like system you
might be able to install it from a system package.

Art

On 18 May 2010 09:18, Alexander Schunk asch...@gmail.com wrote:

 Hello,

 i want to create a database with php.

 A look in the php manual says that you need a special 4.x MySQL
 version for using
 mysql_create_db().

 I am getting error message: Call to undefined function mysql_create_db().

 When is this function defined and in what version of MySQL?

 yours sincerly

 Alexander Schunk

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] deleting rows with composite primary key

2010-05-18 Thread Systems
Is there a different syntax to the mysql delete statement when the WHERE
clause points only to half of the primary key?

The structure is as follows:
CREATE TABLE IF NOT EXISTS ` table1` (
  `id1` int(10) unsigned NOT NULL,
  `id2` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`id1`,`id2`),
  KEY `id2` (`id2`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Query is
$query = DELETE * FROM table1 WHERE id1 = '$recID';;

Error is a 1064 syntax error.

Any help is appreciated.

Eli


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] deleting rows with composite primary key

2010-05-18 Thread Niel Archer
 Is there a different syntax to the mysql delete statement when the WHERE
 clause points only to half of the primary key?
 
 The structure is as follows:
 CREATE TABLE IF NOT EXISTS ` table1` (
   `id1` int(10) unsigned NOT NULL,
   `id2` int(10) unsigned NOT NULL,
   PRIMARY KEY  (`id1`,`id2`),
   KEY `id2` (`id2`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
 Query is
 $query = DELETE * FROM table1 WHERE id1 = '$recID';;

Integer values do not need to be quoted. You should be able to drop the
semi-colon from the query too.  See if that helps

 Error is a 1064 syntax error.
 
 Any help is appreciated.
 
 Eli
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
Niel Archer
niel.archer (at) blueyonder.co.uk



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] deleting rows with composite primary key

2010-05-18 Thread Niel Archer
  Is there a different syntax to the mysql delete statement when the WHERE
  clause points only to half of the primary key?
  
  The structure is as follows:
  CREATE TABLE IF NOT EXISTS ` table1` (
`id1` int(10) unsigned NOT NULL,
`id2` int(10) unsigned NOT NULL,
PRIMARY KEY  (`id1`,`id2`),
KEY `id2` (`id2`)
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  
  Query is
  $query = DELETE * FROM table1 WHERE id1 = '$recID';;
 
 Integer values do not need to be quoted. You should be able to drop the
 semi-colon from the query too.  See if that helps
 
  Error is a 1064 syntax error.

And try var_dump()ing the complete query to make sure it looks as you
would expect.


  Any help is appreciated.
  
  Eli
  
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 --
 Niel Archer
 niel.archer (at) blueyonder.co.uk
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
Niel Archer
niel.archer (at) blueyonder.co.uk



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] deleting rows with composite primary key

2010-05-18 Thread Bastien Koert
On Tue, May 18, 2010 at 2:51 PM, Niel Archer n...@chance.now wrote:
  Is there a different syntax to the mysql delete statement when the WHERE
  clause points only to half of the primary key?
 
  The structure is as follows:
  CREATE TABLE IF NOT EXISTS ` table1` (
    `id1` int(10) unsigned NOT NULL,
    `id2` int(10) unsigned NOT NULL,
    PRIMARY KEY  (`id1`,`id2`),
    KEY `id2` (`id2`)
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
  Query is
  $query = DELETE * FROM table1 WHERE id1 = '$recID';;

 Integer values do not need to be quoted. You should be able to drop the
 semi-colon from the query too.  See if that helps

  Error is a 1064 syntax error.

 And try var_dump()ing the complete query to make sure it looks as you
 would expect.


  Any help is appreciated.
 
  Eli
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

 --
 Niel Archer
 niel.archer (at) blueyonder.co.uk



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 Niel Archer
 niel.archer (at) blueyonder.co.uk



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



The syntax should be

DELETE FROM table1 WHERE id1 = '$recID';;

No need for the *

-- 

Bastien

Cat, the other other white meat

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] deleting rows with composite primary key

2010-05-18 Thread Niel Archer
 On Tue, May 18, 2010 at 2:51 PM, Niel Archer n...@chance.now wrote:
   Is there a different syntax to the mysql delete statement when the 
   WHERE
   clause points only to half of the primary key?
  
   The structure is as follows:
   CREATE TABLE IF NOT EXISTS ` table1` (
     `id1` int(10) unsigned NOT NULL,
     `id2` int(10) unsigned NOT NULL,
     PRIMARY KEY  (`id1`,`id2`),
     KEY `id2` (`id2`)
   ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  
   Query is
   $query = DELETE * FROM table1 WHERE id1 = '$recID';;
 
  Integer values do not need to be quoted. You should be able to drop the
  semi-colon from the query too.  See if that helps
 
   Error is a 1064 syntax error.
 
  And try var_dump()ing the complete query to make sure it looks as you
  would expect.
 
 
   Any help is appreciated.
  
   Eli
  
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  Niel Archer
  niel.archer (at) blueyonder.co.uk
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  Niel Archer
  niel.archer (at) blueyonder.co.uk
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 The syntax should be
 
 DELETE FROM table1 WHERE id1 = '$recID';;
 
 No need for the *

DOH! How did I miss that? Must be time for bed!

 -- 
 
 Bastien
 
 Cat, the other other white meat
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
Niel Archer
niel.archer (at) blueyonder.co.uk



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php