Jump to content

[SOLVED] Error: INSERT command denied to user 'user_name'@'localhost' for table 'table_na


hasnainwasaya

Recommended Posts

I've made my own customized admin panel to edit tables. The script worked fine on my localserver(wamp) but is showing this error when i try to update or insert a record ...select and delete is working fine..

 

Have used same function for update, delete, and insert

 

If anything is unclear please ask me..

???

Link to comment
Share on other sites

  • 1 year later...

remove database name before table name.

 

example:

 

`designweb`.`order`  === > remove `designweb`

 

`designweb`---->database name

`designweb`----->table name

 

wrong:

INSERT INTO `designweb`.`order` (`id` ,`orderid` ,`email` ,`date` ,`product` ,`amount` ,`discount` ,`total` ,`tax` ,`stotal`)VALUES (NULL , '$orderid', '$semail',CURRENT_TIMESTAMP , 'cms','330','0','$total','$tax','$stotal');

Right:

INSERT INTO `order` (`id` ,`orderid` ,`email` ,`date` ,`product` ,`amount` ,`discount` ,`total` ,`tax` ,`stotal`)VALUES (NULL , '$orderid', '$semail',CURRENT_TIMESTAMP , 'cms','330','0','$total','$tax','$stotal')

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.