mysql - phpMyAdmin, an 'if'-esque type statement for 2 foreign key fields in 1 table -


as title suggests, have difficulty explaining this. :p

i have 3 tables in phpmyadmin setup.

within 1 of tables, contains 2 foreign keys. e.g foo_id , bar_id. these have been indexed , displaying fields names.

is possible constrain can selected in bar_id after first selecting foo_id?

if x=1 print = 6-10 else print 1-10

thanks in advance.

i don't think can constraint, if wanted achieve trigger.

however kind of validation logic in app layer, unless people going using database directly.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -