A
A
Alexander Alexandrovich2016-11-18 12:53:11
PHP
Alexander Alexandrovich, 2016-11-18 12:53:11

What is the best way to make attributes generic and easy to use?

Good day.
Please tell me, there is a tourist catalog of Russia, which describes sights, parks, temples, etc. Each directory element has its own attributes. (Which can communicate with each other)
The following options are currently being discussed:

  • EAV
  • Mongo
  • Using a JSON field in a relational table

What is the best way to organize them? If anyone has experience with these methods, please share your experience.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
axblue, 2017-02-21
@leshikgo

Modified and working your bike:

$(document).ready(function(){
 var success_y = false;
 
$('#input_mbr').on('input', function(){
  var val = $(this).val(),
   n = /https?:\/\/vk\.com\/[a-z0-9:@./?\\%&=]+/i ;
  
  if (!n.test(val)) {
   $(this).addClass('wrongt');
   success_y = false;
 
   $('#ervkin').fadeIn(750);
   return false;
  } else {
   $(this).removeClass('wrongt');
   $('#ervkin').fadeOut(500);
   success_y = true;
  }
 });
 
  $('.follow').submit(function(){
    if (!$success_y) $('#ervkin').fadeIn(750);
    if (!$success_y) return false;
  });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question