Link to home
Start Free TrialLog in
Avatar of ItsMe
ItsMe

asked on

store order in a mysql table ?

hi! i want to save plenty complete order forms in an mysql table. so, how would you solve this ?

i've got a simple stringgrid in delphi, containing the order - product informations. this table must be saved in one field of the mysql table. should i save the order table as csv or stream in the sql table ? what would you do ?
Avatar of kretzschmar
kretzschmar
Flag of Germany image

i would not do this in this way,

i would create order-specific tables in your database,
and use a tdbgrid for editing
Avatar of inthe
inthe

if one field i agree add some more varchar fields to the table so order no ,product info etc are seperate,that would keep things more logical/clear and easier to search by later.
ASKER CERTIFIED SOLUTION
Avatar of DragonSlayer
DragonSlayer
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ItsMe

ASKER

maybe my databse has to store up to 1 million orders, then 1 have one million tables. isn't this a little bit too complicated ?
nono,
dragonslayer means two tables, (which i do agree to do so)
which then can contain millions of records, not complcated,
and its a like standard to do so
Avatar of ItsMe

ASKER

yes, some others told me to do this, too. does anybosy knows zeos dbo ? i don't know how to save the record to the database.

kind regards
ItsMe
no, thats the first time i hear about zeos-db

does it have odbc or ado support?
Avatar of ItsMe

ASKER

it establishes an direct connection to my mysql server.

check www.zeoslib.org

kind regards
ItsMe
well, ok, a short visit to this site

try a app from scratch
(can't do it myself yet)

set up the tables in your database like dragonslayer describes and
use
a TZXXSqlTable for editing the tables
(seems the easiest method for the first time)

connect to TZXXSqlTable a datasource and to the datasource a tdbgrid and a tdbnavigator
zeos uses libmysql dll instead of odbc

i would get the source for lite version of winmysql.
(from winmysql.com i think)
it uses libmysql also and the + for you is it uses a stringgrid for displaying.
to do your updates the syntax is simiar to php:
as an example say you have a db with table called advertisers and 2 fields ,to update use:

INSERT INTO advertisers (field1,field2 )VALUES ('testdata', 'testdata')  

i have zeoslib installed but i ony ever used it with ZDBGrid and normal datasource and Dbnavigator to update.you can do it that way using no code at all only some settings in the object inspector.otherwise you need to look at ZUpdateSQL and ZMysqlQuery to do it manually.
wow i had open for 42 mins! :)

well meikl i can say it does work that way with no code required ;-)
though i do find it is easier using the native mysql units
ItsMe:

I have found that you have a great many questions open. Some of them are quite old. Please address them immediately:

https://www.experts-exchange.com/jsp/qShow.jsp?qid=20080809
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20081517
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20110611
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11412679
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20170559
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20172193
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20177907
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20178750
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20179401
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20181503
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20187389
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20187432
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20188151
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20243899
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20250630
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20254819

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
https://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!


thanks!
amp
community support moderator
Avatar of ItsMe

ASKER

makes sense ;)