Update a database easily application/script

Posted on 2014-07-17
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
    Take a look at this, very easy and very inexpensive.
    LVL 107

    Accepted Solution

    The general design pattern for this is called a "table maintenance" script.  An example is given in this article.
    LVL 107

    Expert Comment

    by:Ray Paseur
    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.
    LVL 34

    Expert Comment

    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.
    LVL 3

    Author Comment

    by:Computer Guy
    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 34

    Expert Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmakerā€¦
    This video teaches users how to migrate an existing Wordpress website to a new domain.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now