[Last Call] Learn how to a build a cloud-first strategyRegister Now


Update a database easily application/script

Posted on 2014-07-17
Medium Priority
Last Modified: 2014-07-17

We have a car database that has Makes and Instock

The Toyota table will have

Car           InStock
Tundra      3
RAV4          7
Prius          9

The THonda table will have

Car           InStock
Civic              9
Accord          2
Insight          4

Is there an application a PHP application that would allow us to edit the stock easly. Not looking for PHPMYADMIN as an answer.

Even if we have to rebuild the DB, but something that will allow us to edit, and create.

Then I can use some code to pull the data from the DB and display it on our site.

Question by:Computer Guy
LVL 21

Expert Comment

by:Randy Poole
ID: 40202022
Take a look at this, very easy and very inexpensive.
LVL 111

Accepted Solution

Ray Paseur earned 2000 total points
ID: 40202035
The general design pattern for this is called a "table maintenance" script.  An example is given in this article.
LVL 111

Expert Comment

by:Ray Paseur
ID: 40202047
But that said, a more useful design might be something like this, with one row per vehicle:

make VARCHAR(24)
model VARCHAR(24)
options VARCHAR(24) perhaps with several of these columns, one for each kind of option.

Then the SELECT query would say something like this:

SELECT make, model FROM cars WHERE make = 'Toyota' AND model = 'Prius'

The count of the results set would tell you exactly how many Prius you had in stock.  If you wanted to count all of the Toyota cars at once the query would look something like this:

SELECT count(model), model FROM cars WHERE make = 'Toyota' ORDER BY model GROUP BY model*

* Can't remember the exact structure for ORDER and GROUP but this is pretty close.
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

LVL 35

Expert Comment

ID: 40202078
I would suggest using HeidiSQL as a free, non-hosted app to maintain the data. It's always been a good GUI for MySQL for me and it has a very easy data table editor.

Author Comment

by:Computer Guy
ID: 40202265
Hi, When it comes to HeidiSQL, I am using WHM and cPanel.

I put in the hostname to the server, then the DBuser and password, and the databases don't pop up
LVL 35

Expert Comment

ID: 40202424
Okay, you could have given a little more time to respond before accepting another answer. In any case, if you still want to try out HeidiSQL, you need to give permissions to your database user so that your IP address can access the database.  You can do this through cPanel.

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month18 days, 6 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question