Jump to content

Search the Community

Showing results for tags 'activerecord'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I am implementing a form using CActiveForm (Yii) and my database is in MySQL. My requirement is to implement a solution which would enroll and assign my users (candidates, filling the form) with date_of_test and and unique roll_number based on test_locations. I have multiple test_locations and they have specific seating capacity for a day e.g Arizona = 1000, Florida = 200. Now based on the seating capacity i need to assign roll_number (unique) and date_of_test to a candidate, e.g in a candidate table data would something be like: id | roll_number | date_of_test | state | <--- ID is auto incremented by MySQL ----------------------------------------------- 1 | 999 | 11/20/2013 | Arizona ----------------------------------------------- 2 | 50 | 11/20/2013 | Florida ----------------------------------------------- 3 | 1000 | 11/20/2013 | Arizona ----------------------------------------------- 4 | 1001 | 11/21/2013 | Arizona <--- Next Date given to candidate ----------------------------------------------- Test locations are assigned to candidates by application based on their present location i.e if someone is from Arizona state his test location would automatically be selected as Arizona (implemented via simple dependent dropdown). I am finding really hard to implement this logic of assigning roll_number and date_of_test to candidates, as i don't want anyone to have same roll number and anyone given a date_of_test more than the seating capacity of a location. Maybe Yii/PHP/MySQL has some function which i am not aware would assist me in implementing it easily. Thus, requiring assistance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.