Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Is there a DTE way to create 2 matching IDs in 2 separate tables when you add a row

$
0
0

I have a table which I refer to as a primary table because it is used in many different forms. It forms the basis on articles, blog posts, FAQ, testimonials other. Many, most of these share use of the same common fields. This works very well.

However I have an events form which the same core but only for this form there are about 30 additional fields. What I would like to do is move all the events-related fields to a separate table and link the 2 tables by a common ID. Something like articles and events tables

articles table:
id
title
slug
publish
etc.

events table:
id
event_title
event_date
event_time
etc.

simple query:

select
articles.id,
articles.title,
articles.slug,
events.event_title,
events.date,
events.time
from articles, events
where articles.ID = events.ID
-- and articles.ID = 100

Pretty simple query. What this does is eliminate a bunch of unneeded rubble from the articles table. The question is, when you create a NEW entry in DTE can you make it create the same ID in 2 tables?


Viewing all articles
Browse latest Browse all 1816

Trending Articles