Using SQL to edit text on website [closed] - sql

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm working on a basic admin panel for a site of mine but have run into a problem. I haven't done much SQL so sorry if this is fairly basic knowledge.
The Site has a JS Slider which shows our sites best selling products currently (As seen here : http://www.theyard-store.co.uk/)
I created a form so I could easily update the slider, but I don't know the best way of linking it to the database.
I thought about just having a separate table for each product and a separate form then just use SQL UPDATE to do this.
Is this the best way of doing it? Is there more efficient methods?

"I thought about just having a separate table for each product "
No, seperate tables for each product is a nightmare...imagine a new product being added and you having to go through each line of code to refer to the new product table added.
My recommendation is to have a single product table...something simple like "Product_ID, Product_name, coupl other data points, etc.." as you product table. A second table (product_form?) can be created that refers to the product_ID in your product table and then store relevant data on your form information.
My preference is to never over-write data in your database either. If you include a 'status' or 'active_flag' column in this new product_form table, you can simply insert a new line and set the old line to inactive. This way you save all previous entries for the product_form record and can build a history/workflow/validation process.

Related

(Quickbooks Online) Triggering Fields to Autopopulate via the API [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm creating invoice records via the Quickbooks API, which is working fine. But, certain fields that autopopulate in the UI, are not populating when creating via the API (For instance the Invoice # / DocNumber). Any thoughts on how to force those fields to autopopulate when using the API?
Note: Someone marked this question as unclear. No idea how an exact question can be made any clearer.
Partially figured this one out. The DocNumber needs the AutoDocNumber field set to true. Still a few other fields that are not auto populating, though.
The other fields I just decided to pull from the customer record, since they exist there as well.

How to Create optimal database design by looking at below image i.e invoice [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How to Create optimal database design by looking at below invoice of XYZ Ltd. stationary store, also show all possible tables including relationships.
Here's the approach you should take.
Look through the form to figure out what fields should exist.
Determine the relationships between those fields; i.e. do they relate to the same thing (e.g. the invoice, an invoice line, an item, etc) as other fields.
Figure out the relationships between those things (i.e. can an item appear on more than 1 invoice / can an item appear more than once on the same invoice / is there a 1:1 relationship between them?
For each "thing", create a table. That table should have those fields directly associated with that thing defined on it, along with any useful additional fields (e.g. primary key).
For each "thing" create required relationships between its fields and the related tables' fields.
Good luck.

Is column order in a table relevant for version control? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
A version control system compares the scripted definition of a table to the checked in state. So I guess many cvs will see column reordering of a table as a change.
Since tsql does not support to add a new column in the middle of a table and because in a relational DB the ordering should not matter, what are good practices for version control of table definitions if the column-order could change.
Sometimes you could need to redo a drop column in the middle of a table.
You should be storing scripts to setup your database in source control, not trying to have something reverse-engineer those scripts from the state of the database. Column-order then becomes a non-issue.
Specifically, I've seen two schemes that work well. In the first, each database schema update script is given a sequential number, and the database tracks which sequence number is the last applied. In the second, each database schema update script is given a UUID, and the database tracks all UUIDs that have been applied.
I would checkout the book Refactoring Databases for more details and examples of how to manage database changes.

Want to do some changes in the existing table that is created two days back [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I had created one table called PLANCESS two days back. Now i want to do some changes in the table using TOAD. How can i get back? What query should i use? FYI I am a beginner. Could you please?
Look up the alter table statements in the documentation of Oracle (for example here)
For the sake of it, you wouldn't refer to these types of statements as queries but as ddls (Data definition language).
You can use alter query to make changes in your "PLANCESS" Table.
one another way is you just open the property box of your "PLANCESS" Table and you can edit from there also.
But property is only change in TOAD.
Write table name and press F4 you will get property window of that table.
Regards,
Chaitanya

Invoice Billing System in vb.net [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to Develop a billing system in that i need item name, which comes from database (Combo box or Autosuggestion Type) When we Select the item Rate will come from database. after that when we enter qty the total will be displayed. after complete one line we can enter another. but i don't know how to deal with that which tool to use please help me
You need to think first whether your system is web-based or desktop based.As u have tagged this question in vb.net I assume that you are sure to develop things in .net.
1.You can develop this using vb.net both as desktop based and web-based.
2.In any case you have to deal with database.like sql server for .net
3.You got to make tables and fetch the data which is a cakewalk in .net
4.Then insert the record and calculate the price and print the invoice if needed..
I think it will work as a roadmap for you