Re[2]: [PHP-DB] Table locking

2004-07-14 Thread Pablo M. Rivas
Hello Rosen, Lets say you are working against mysql... 2000 records in table 1 and 500.000 records in table 2 is few information... and it's working 'cause you don't have 5 records in table 1 and 3.000.000 records in table 2. But, I personally advise you to listen what Pete

Re: [PHP-DB] Table locking

2004-07-14 Thread Rosen
Yes, it will be better, but this way it's impossible, because this is a existing database with more than 2000 records in table 1 and 500 000 records in table 2 - and I should change logic of all software for this. I have an idea to try something - whould be working ? : I want to create some fictiv

RE: [PHP-DB] Re: Hold System

2004-07-14 Thread Justin Palmer
Hi, Thanks Peter for your incite. I think that I will probably run a cron for the clean-up. With my sloppy approach I see one problem that I just don't see how to overcome. Maybe you can help me clarify it. In the example of Bob, Mary and Barbara that I gave in my last post. If Bob cancels hi

RE: [PHP-DB] Re: Hold System

2004-07-14 Thread Justin Palmer
Hi, Coordinators login into our system and look through a listing of students. They see a student that they think that they can place. They view the students profile that has a lot of information regarding, age, sex, country of origin, etc... There is a 'Hold Student' Link on that page. This p

Re: [PHP-DB] Hold System

2004-07-14 Thread Daniel Brunner
Hello!! CREATE TABLE `hold_tracker` ( `id` int(11) NOT NULL auto_increment, `STUDENT_ID` int(11) NOT NULL default '0', `USER_ID` int(11) NOT NULL default '0', `valid` char(1) NOT NULL default '1', `date_held` bigint(20) NOT NULL default '0', `date_created` bigint(20) NOT NULL default '

Re: [PHP-DB] Re: Hold System

2004-07-14 Thread Peter Westergaard
Ah, now I think I understand. Thank you. > 2. A Coordinator can only hold a student while in the #1 position for a > certain amount of time. (I don't have a problem with calculating the > time.The problems are: > A. What do I do with the record once there hold has expired? > B. Also what do I do

RE: [PHP-DB] Re: Hold System

2004-07-14 Thread Justin Palmer
Hi, A 'hold' is a time period in which a Coordinator has to place the specific student with a Host Family. Coordinators can hold a specific student for up to 48 hours. At which time the student must be placed with a host family with in that time period. Or the coordinator has canceled the hold w

RE: [PHP-DB] Re: Hold System

2004-07-14 Thread Justin Palmer
You basically have the idea: -Students are matched to Host Families (We have Students, but we do not have Host Families) -It does not matter how many holds a Coordinator has. They can have zero. It is to there discretion. -Coordinators pick students to place. It is fairly involved. But I have t

Re: [PHP-DB] Re: Hold System

2004-07-14 Thread Peter Westergaard
I guess I'm still not grasping... Who creates the temporary "I'm-trying-to-place-you" link between coordinator and student? The system automatically, or the coordinator manually? What is a "#1 position"? How does a student get there? Who or what places them there? How do they leave that posit

RE: [PHP-DB] Re: Hold System

2004-07-14 Thread Ed Lazor
Hold refers to the period of time when a student is waiting to be matched with a host family. - You have three groups: students, coordinators, and host families. - Coordinators match students with host families. - Students go through different stages of processing. The goals are to: - provide e

[PHP-DB] Re: Hold System

2004-07-14 Thread Peter Westergaard
Could I get a plain-language explanation of the process of a 'hold'? I'm not entirely clear what is happening, and what an 'expiry' means in the context of the hold and what a '#1 position' would represent for a student. -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
For those that are curious, here's the working query: SELECT options. * , count( option_items.optionID ) AS n FROM options LEFT JOIN option_links USING ( optionID ) LEFT JOIN option_items ON options.optionID = option_items.optionID WHERE option_links.productID = '$productID' GROUP BY options.optio

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
Sorry, I'm wrong.. WHERE cannot refer to aggregate columns.. you must use the HAVING clause. -Micah On Wednesday 14 July 2004 12:07, Micah Stevens wrote: > It is a column.. ;) > > And the docs say you can refer to an aliased aggregate column in the where > clause: > > http://dev.mysql.com/do

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
It is a column.. ;) And the docs say you can refer to an aliased aggregate column in the where clause: http://dev.mysql.com/doc/mysql/en/SELECT.html I'll take this to the mysql list.. Thanks for your help.. -Micah On Wednesday 14 July 2004 12:01, Torsten Roehr wrote: > "Micah Stevens" <[EMAI

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Torsten Roehr
"Micah Stevens" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you Torsten , > > They're backticks, and I get the same error after removing them. > > Any other ideas? Then I guess you can't use num in your WHERE clause - MySQL thinks it's a column. Torsten > > > -Micah > > >

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
Thank you Torsten , They're backticks, and I get the same error after removing them. Any other ideas? -Micah On Wednesday 14 July 2004 11:48, Torsten Roehr wrote: > "Micah Stevens" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > Hi, > > > > I'm getting an unknown colum `

[PHP-DB] Re: query problem..

2004-07-14 Thread Torsten Roehr
"Micah Stevens" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm getting an unknown colum `num` in where clause error with this query: > > $options = mysql_query("select options.*, > count(option_items.optionID) as `num` > from options > left join option_links using (

[PHP-DB] query problem..

2004-07-14 Thread Micah Stevens
Hi, I'm getting an unknown colum `num` in where clause error with this query: $options = mysql_query("select options.*, count(option_items.optionID) as `num` from options left join option_li

Re: [PHP-DB] Re: Debian & mssql_init

2004-07-14 Thread Frank M. Kromann
mssql_init() is a function used to initialize stored procedures and it was introduced inphp 4.1.0 (according to the docs). The versions you are listing for both PHP and FreeTDS are very old so I would suggest updating these first. - Frank > "Damien Babilon" <[EMAIL PROTECTED]> wrote in message >

[PHP-DB] Hold System

2004-07-14 Thread Justin Palmer
Hi, I am currently working on a hold system. The system will allow Coordinators to hold international students to place them with American Host Families. I am having a hard time coming up with a good MySQL table design for this process. I have a table now that looks something like: CREATE TA

[PHP-DB] Re: Debian & mssql_init

2004-07-14 Thread Peter Westergaard
"Damien Babilon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > the mssql_connect function work right, but php give me back this message when I try mssql_init: > Fatal error: Call to undefined function: mssql_init() in /var/www/eurogsmtest/test.php on line XX Shouldn't you use mssql

[PHP-DB] Debian & mssql_init

2004-07-14 Thread Damien Babilon
Hi everybody, I'm new to the list and new with php. I try to execute a stored procedure on a MSSQL server. The web server is a Debian machine with: php4 4.1.2-6woody3 php4-sybase4.1.2-6woody3 freetds0 0.53-7 the mssql_connect function work right, but php give me back thi

Re: [PHP-DB] Mysql and rollbacks

2004-07-14 Thread Peter Westergaard
> I was about to suggest the same, the latest builds of MySQL have theese > functions from what I knew... I think youll find what you need there. Thanks, Kim. Any stable and fairly affordable hosts out there using these latest builds? Mine is back a few, no transactional functionality that I can