[PHP-DB] RE: Time Allocation Issue
Thank you that did exactly what I was looking for. Thanks Jefferson Cowart [EMAIL PROTECTED] Support Open Instant Messaging Protocols http://www.petitiononline.com/openIM/petition.html > -Original Message- > From: Ryan Fox [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 29, 2002 16:08 > To: Jefferson Cowart > Cc: [EMAIL PROTECTED] > Subject: Re: Time Allocation Issue > > > > I have tried doing just a unique > > index on referee, date, and time but the issue is I use a 0 > to indicate > > that the slot is open. > > Is > > there any better more efficient way to do this? > > Use null to indicate the slot is open. Your unique index can have > multiple null values, but not multiple zero values. I believe this is > what you are looking for. > > Cheers, > Ryan Fox > [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Time Allocation Issue
I'm writing a web application in PHP to do referee scheduling for soccer games. For each game (a single row in a table) I have a cell for referee. The cell stores an integer that I can do a join on with another table of people. I need a way to prevent people from being able to schedule themselves for multiple slots at the same time. (All I care about is start time, for now I'm going to ignore the issue of a game ending after the next one has started.) I have tried doing just a unique index on referee, date, and time but the issue is I use a 0 to indicate that the slot is open. Because of that I don't see a way to do it natively in mysql as such each time I do an insert I think I am going to need to do a select right before to make sure there no conflicts. Is there any better more efficient way to do this? Perhaps natively in mysql. TIA ---- Thanks Jefferson Cowart [EMAIL PROTECTED] Support Open Instant Messaging Protocols http://www.petitiononline.com/openIM/petition.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Input Filtering
I realize that I need to do some filtering on user input (variables from POSTs or GETs) to prevent errors and security breaches. Has any one written a function to do this. As it is I realize I need to addslashes on anything going into a DB and worry about semi-colons to prevent SQL injection attacks. Is there anything else I need to worry about. I'm using a php 4.2.1 front end to a mysql backend. TIA Thanks Jefferson Cowart [EMAIL PROTECTED] Support Open Instant Messaging Protocols http://www.petitiononline.com/openIM/petition.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Join on insert???
I am writing scripts to load user data into a MySQL database. I have tables in the DB called People and PeopleEmail. The PeopleEmail table stores one email address per record with one of the columns corresponding to the PID of the people table. Is there a way to run a single query that will insert the data into the people table and then take the auto generated pid and use it to insert the email into people email. Right now I envision having to use 3 queries (1 insert into people, a select to retrieve the PID, and then another insert to insert the email.) Is there an easier way? Thanks Jefferson Cowart [EMAIL PROTECTED] Support Open Instant Messaging Protocols http://www.petitiononline.com/openIM/petition.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PDF/FDF Support
I'm trying to write a PDF form that people can fill in. I want to then take the data, store it in my database, and then recall the data, and display a filled in form with that data. I see two options. The first is to have acrobat post the entire PDF file and store the entire file. This option seems to be to be a little bit of a waste as much of the data is the same (the form). The second option is to have it post FDF data and then later turn that around and put it back into a form for people to view. Does anyone know of any good documentation on how to do this with PDF files, PHP, and a DB backend? Thanks Jefferson Cowart [EMAIL PROTECTED] Support Open Instant Messaging Protocols http://www.petitiononline.com/openIM/petition.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php