[FX.php List] Looping validation

Gjermund Gusland Thorsen ggt667 at gmail.com
Sun Sep 7 14:56:49 MDT 2008


That would not be a php issue, rather how you design your table.

When you make a request to have a tutor teach a student at a certain
point in time,
the creation of that record should fail if there is no tutor available
for that student.

ggt

2008/9/7 Josh Shrier <joshshrier at gmail.com>:
> Can you elaborate on that a little. I am new to PHP.
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Gjermund Gusland
> Thorsen
> Sent: Sunday, September 07, 2008 11:19 PM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] Looping validation
>
> I would design the solution in a way that it would make a not unique
> respons to FX.php I believe.
>
> ggt
>
> 2008/9/7 Josh Shrier <joshshrier at gmail.com>:
>> I have a script that checks if an activity a user suggests have an
> available
>> employee to train at that date and time. The way the script works is it
>> creates variables for the date and time, and then goes to the staff table
>> and loops through the portal rows to see if that person has a spot
>> available. If yes, then it books that trainer. If not, it goes to the next
>> staff member and repeats the same. If the script gets through all the
> staff
>> members and there is no one available during that time then an error is
>> returned. I would like to know how to approach coding this script in PHP,
>> given that the staff table is not related to the contacts table until a
>> staff member is chosen which isn't until the end of the script.
>>
>> Thanks,
>>
>> Josh Shrier
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list