Populating Predefined Values using phpmyadmin

Hi,

I'm building an Alumni site for my College that is 175 years Old....

I have a to create a Years dropdown that would start from 1837 and go till Curent Year..... Guess it would take me forever if I have to use the Admin Panel.... any ways I can create using SQL statements ?

I also have 120 "Subjects" to be populated, but I figure if the above is solved, this would be a jiffy...

and while at it, do I NEED to use the __  in the LKey as a prefix ? I tried w/out and no earthquakes..... but if use them, I get the underscores in the pages......

(Mods> I tried searchin the Forum and Trac for the above queries, but cudn't find a solution. Pls re-direct if one exists. Thanks)

 

"May the Power of the Open-Source be with You" - The Jedi
Quote · 25 Mar 2012

Well... I experimented and found I could easily populate the years and the subjects thru a csv import...

My doubt now is whether I should add the values to any other table (like localisation) ?

SOS :-)

 

"May the Power of the Open-Source be with You" - The Jedi
Quote · 26 Mar 2012

any help on this would be welcome :-) Thanx

"May the Power of the Open-Source be with You" - The Jedi
Quote · 5 Apr 2012

i think you should create a new table but you can use the predefined one also.

and this code is never ever tested i am typing it just now here but it should atleast give you an idea.

for ($year = 1837; $year <= 2012; $year++) {

mysql_query("INSERT INTO `your_table` VALUES ($year)");

}

just execute the loop and it should work or you get the idea i think..

Good luck

so much to do....
Quote · 5 Apr 2012

Prasankh, this was an easier method I use in the Parent site .... I'm collecting the yrs in PUC, UG, PG, M.Phil - fro/to :-)

<select name="ug_year">
   <option value="">Select if applicable</option>
   <?php 
   $range = range(1937,$thisyear);
   foreach ($range as $mccyear) {
   echo "<option value='$mccyear'>$mccyear</option>";
   } ?>
   </select>

Just not sure how to integrate in the Dolphin Script.....

"May the Power of the Open-Source be with You" - The Jedi
Quote · 21 Jul 2012

You can add a predefined list for years.

Example:

Create a list with name "YearForTest"

Now put the attached file that i just wrote on your server and run yoursite.com/dolphin/addyears.php

UPDATE THE FILE WITH YOUR CORRECT YEARS FIRST

It will add those list of years in the predefined list from the selected year (1837) to 2012

Hope it will help.

addyears.php · 440B · 162 downloads
so much to do....
Quote · 21 Jul 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.