delphi - Insert Checkbox values into mysql database -


i have query use show data 3 tables in dbgrideh. dbgrideh has field checkbox. when check checkbox program gets error message cannot insert data triple table. how solve problem?

i have 3 tables.

(table name) first table have fields 'ids, 'name', 'address' value 1, 'indah', 'jakarta'

(table age) second table have fields 'ida', 'name', 'age' value 1, 'indah', 10

(table class) third table have fields 'idc', 'name', 'class' value 1, 'indah', 2

i use 1 query select data 3 tables this:

select name.name, age.age, class.class name, age, class 

i have error cannot update complex query more 1 table

try this:

select      name.name, age.age, class.class      name  join     age on name.ids=age.ida join     class on name.ids=age.idc 

more mysql join


update:

you can't insert multiple tables in 1 mysql command. can use transactions.

begin; insert users (username, password)   values('test', 'test'); insert profiles (userid, bio, homepage)    values(last_insert_id(),'hello world!', 'http://www.stackoverflow.com'); commit; 

more mysql transations


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -