Hi,

I put websites together using Xoops and OsCommerce. I need to know how to edit mysql databases using Cpanel. Please could you point me in the direction of some tutorials? There are some which show how to se up a database but not how to edit one.

For example, in a client's Oscommerce cart I have to delete all the items from the Best Seller box so he can start a new list there. I found some instructions on the web. The Best Seller box is reset like this:

You can use now phpMyAdmin and go to the product database and set products_ordered to "0".

I can find the file under the structure tab in mySql but dont know what to do next! :)

Would appreciate any leads.

Thank you.

Mekano

Re: How do I edit a file in MySql please? 80 80

Click the "Browse" tab and you should be able to modify it from there.

Or Click the small icon next to the table name.

To delete all items from a table you have two options.

Browse to the table then click the red "Empty" tab.

The other option is to click the SQL tab and write the query.

delete from osCommerceProductTableName;

Then click go and it will wipe the table.

Re: How do I edit a file in MySql please? 80 80

I sounds like they want you to set a particular value to 0 in a table. If you've found the table, you're golden. The left nav panel of phpMyAdmin shows you all the tables once you've selected a database. Click on the table you need. This will bring that table active, but showing he schema. You want to look at what is in the table. Click Browse .. sounds like there are a limited number of rows in the table (perhaps only one). Click the green check mark to edit the record. This pops open a form that lets you edit each value in the row. When finished, scroll to bottom and click the Go button. Mission accomplished. If you need to set the value in a number of rows, a single sql command will likely be faster. As an example, I have a table that I reuse on sites, but need to change an email address that appears in all records. Each row has an id number that starts at one so I run a simple update statement that sets the email address to a new value for all records where the id > 0 (which is all of them..)

hope that helps .. once you get comfortable with phpMyAdmin, you'll be able to really fly around it. Quite powerful tool to have available!

cheers,

Jim

Re: How do I edit a file in MySql please? 80 80

Why not just access the database using the 'mysql' client side program?

mysql -hwww.yourwebsite.com -uyourusername -p

This will prompt you for the password. Once you are logged in you have direct access to the database.

Unless of course the admins have not granted permissions to access from remote. In which case you are stuck using PHPmyAdmin - yuck. I stopped using that after a few databases got mangled during a dump.

Best option is the one I suggested if it is available. Otherwise I use HeidiSQL.

Re: How do I edit a file in MySql please? 80 80

Just wanted to say thank you all so very much for your help and sorry not to have said so before. Thanks again :)

Mekano

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.