Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread clive
Robert Cummings wrote: It depends on the data. Certainly for student enrolments I would want a paper trail (so to speak) and would just set a status field. But if it was say, an online shopping cart or cached data... I'd just purge it. Cheers, Rob. yes - you are right, I was just thinking abo

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread Robert Cummings
On Fri, 2008-12-12 at 09:06 +0200, clive wrote: > Colin Guthrie wrote: > > 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble: > >> As for my "Foreign Keys Question", I think the answer is that it > >> enforces rules upon the configuration (i.e., deleting, altering, and > >> such), but

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread clive
Colin Guthrie wrote: 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble: As for my "Foreign Keys Question", I think the answer is that it enforces rules upon the configuration (i.e., deleting, altering, and such), but does not provide any significant service beyond that. Well that'

[PHP] How serialize DOMDocument object?

2008-12-11 Thread Михаил Гаврилов
How serialize DOMDocument object?

Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread German Geek
OK, i give u that, Rob. :-) I might just ask MySQL questions here, if i have some. I guess, if people get more responses here, it shows that this mailing list is superior (no offence to the MySQL list :-P ). Tim On Fri, Dec 12, 2008 at 4:04 PM, Robert Cummings wrote: > It's Christmas... the sea

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Chris
Waynn Lue wrote: As a side note, FKs do enforce other table specific properties like indexes on the fields being constrained, so they do add value there as well. But there's of course an extra cost on updates and inserts to see if the FK is violated. On the external table? No they don't. mysql

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Waynn Lue
As a side note, FKs do enforce other table specific properties like indexes on the fields being constrained, so they do add value there as well. But there's of course an extra cost on updates and inserts to see if the FK is violated. Waynn On 12/11/08, Colin Guthrie wrote: > 'Twas brillig, and C

Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread Robert Cummings
It's Christmas... the season of giving and tolerance :| On Fri, 2008-12-12 at 13:56 +1300, German Geek wrote: > This list seems to be turning into a MySQL list with a few PHP questions... > Tim-Hinnerk Heuer > > http://www.ihostnz.com > > > On Fri, Dec 12, 2008 at 1:53 PM, bruce wrote: > > >

Re: [PHP] Can GD make a JPG thumbnail of a PDF?

2008-12-11 Thread Patrick Moloney
It looks like there is something wrong with your newsreader because your replies are not being connected to what you are replying to. Have you noticed? Much harder for everyone. What newsreader are you using? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[PHP] Re: Foreign Keys Question

2008-12-11 Thread Colin Guthrie
'Twas brillig, and Chris at 12/12/08 01:20 did gyre and gimble: Micah Gersten wrote: Colin Guthrie wrote: The ON DELETE CASCADE option is key here... "DELETE FROM students where student_id=1" will remove all traces of that student from the db... all the course they've attended, all the instruct

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread Chris
Micah Gersten wrote: Colin Guthrie wrote: The ON DELETE CASCADE option is key here... "DELETE FROM students where student_id=1" will remove all traces of that student from the db... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread Micah Gersten
Colin Guthrie wrote: > The ON DELETE CASCADE option is key here... "DELETE FROM students > where student_id=1" will remove all traces of that student from the > db... all the course they've attended, all the instructors who have > taught them etc. keeps things nice and tidy without having to put th

Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread German Geek
This list seems to be turning into a MySQL list with a few PHP questions... Tim-Hinnerk Heuer http://www.ihostnz.com On Fri, Dec 12, 2008 at 1:53 PM, bruce wrote: > Hi guys. > > Architecting an app that's going to have users interacting with different > levels of the db/tbls, and trying to fig

[PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread bruce
Hi guys. Architecting an app that's going to have users interacting with different levels of the db/tbls, and trying to figure out a few things. The highlevel layout looks like: collegeTBL deptTBL with ->collegeTBL.id = deptTBL.colID I also have a status tbl for each collegeTBL/deptTBL col

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread Ashley Sheridan
On Fri, 2008-12-12 at 10:59 +1300, German Geek wrote: > On Fri, Dec 12, 2008 at 7:03 AM, tedd wrote: > > > At 11:23 AM -0500 12/11/08, Robert Cummings wrote: > > > >> On Thu, 2008-12-11 at 11:05 -0500, tedd wrote: > >> > When I say "Hack a site" I mean to do something to get the site to > >> > >

[PHP] Re: Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Colin Guthrie
'Twas brillig, and Terion Miller at 11/12/08 14:56 did gyre and gimble: Hey Everyone, I am wondering if using a framework such as one of these may make my life easier, which do any of you use and what has been your experience with the learning curve of them? I just put Cake on my local server, ba

[PHP] Re: Foreign Keys Question

2008-12-11 Thread Colin Guthrie
'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble: As for my "Foreign Keys Question", I think the answer is that it enforces rules upon the configuration (i.e., deleting, altering, and such), but does not provide any significant service beyond that. Well that's a fairly significant

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread German Geek
On Fri, Dec 12, 2008 at 7:03 AM, tedd wrote: > At 11:23 AM -0500 12/11/08, Robert Cummings wrote: > >> On Thu, 2008-12-11 at 11:05 -0500, tedd wrote: >> > When I say "Hack a site" I mean to do something to get the site to >> >>> provide an unintended result as expected by the author. >>> >>>

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Robert Cummings
On Thu, 2008-12-11 at 16:24 -0500, Robert Cummings wrote: > On Thu, 2008-12-11 at 16:17 -0500, tedd wrote: > > At 3:14 PM -0500 12/11/08, Andrew Ballard wrote: > > > > > >That's the way to go. Just keep in mind that you will have to consider > > >ways of preventing overloading your courses due to c

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Robert Cummings
On Thu, 2008-12-11 at 16:17 -0500, tedd wrote: > At 3:14 PM -0500 12/11/08, Andrew Ballard wrote: > > > >That's the way to go. Just keep in mind that you will have to consider > >ways of preventing overloading your courses due to concurrency, > >whether you use table locks or devise your own mechan

Re: [PHP] Foreign Keys Question

2008-12-11 Thread tedd
At 3:14 PM -0500 12/11/08, Andrew Ballard wrote: That's the way to go. Just keep in mind that you will have to consider ways of preventing overloading your courses due to concurrency, whether you use table locks or devise your own mechanism. I don't know if you are allowing students to self-enro

[PHP] trying to figure out how to create the right query...

2008-12-11 Thread bruce
Hi. I have the following test db/tbl setup. stateTBL +--+ | stateName| | stateID |>>>+ +--+ V V V collegeTBL V +--+ V | collegeName | V | stateID |<<<+ | college

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Andrew Ballard
On Thu, Dec 11, 2008 at 2:32 PM, tedd wrote: > At 1:55 PM -0500 12/11/08, Robert Cummings wrote: >> >> Student attendance should be a table with rows for each student in >> attendance. If you want to limit the number make a check before adding >> another student. Don't hard code the number via fie

RE: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Boyd, Todd M.
> -Original Message- > From: Eric Butera [mailto:eric.but...@gmail.com] > Sent: Thursday, December 11, 2008 9:25 AM > To: Bastien Koert > Cc: Terion Miller; PHP General > Subject: Re: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake > etc > > On Thu, Dec 11, 2008 at 10:22 AM, Bastie

[PHP] Re: [PHP-QA] Re: [PHP] Quick question regarding $_SESSION and header()

2008-12-11 Thread Ólafur Waage
Whoops, sent the thanks to the wrong list :P On Thu, Dec 11, 2008 at 7:33 PM, Daniel Brown wrote: > (Forwarding back to PHP General for the archives.) > > On Thu, Dec 11, 2008 at 14:31, Ólafur Waage wrote: >> Its fixed, thanks guys :) >> >> On Thu, Dec 11, 2008 at 7:16 PM, Daniel Brown wrote: >

[PHP] Re: [PHP-QA] Re: [PHP] Quick question regarding $_SESSION and header()

2008-12-11 Thread Daniel Brown
(Forwarding back to PHP General for the archives.) On Thu, Dec 11, 2008 at 14:31, Ólafur Waage wrote: > Its fixed, thanks guys :) > > On Thu, Dec 11, 2008 at 7:16 PM, Daniel Brown wrote: >> On Thu, Dec 11, 2008 at 14:01, Ólafur Waage wrote: >>> I should be able to set a session var and then do

Re: [PHP] Foreign Keys Question

2008-12-11 Thread tedd
At 1:55 PM -0500 12/11/08, Robert Cummings wrote: Student attendance should be a table with rows for each student in attendance. If you want to limit the number make a check before adding another student. Don't hard code the number via fields like above or you'll find it overly ugly to add/remove

Re: [PHP] Quick question regarding $_SESSION and header()

2008-12-11 Thread Daniel Brown
On Thu, Dec 11, 2008 at 14:01, Ólafur Waage wrote: > I should be able to set a session var and then do a header redirect > right? Small bug regarding that and i just need to be sure. This isn't a bug in PHP, it's actually in adherance with HTTP standards (and current browser standards). Prio

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Robert Cummings
On Thu, 2008-12-11 at 13:56 -0500, tedd wrote: > At 1:48 PM -0500 12/11/08, Robert Cummings wrote: > >On Thu, 2008-12-11 at 13:27 -0500, Bastien Koert wrote: > > > On Thu, Dec 11, 2008 at 12:56 PM, tedd > > > > > > Does anyone have any example code to show me the actual syntax? > > > > > Joins

Re: [PHP] Foreign Keys Question

2008-12-11 Thread phphelp -- kbk
On Dec 11, 2008, at 12:55 PM, Robert Cummings wrote: On Thu, 2008-12-11 at 13:46 -0500, tedd wrote: At 12:29 PM -0600 12/11/08, phphelp -- kbk wrote: Hey tedd --- Do I understand your structure correctly that you have something like: Courses (table) course_id, subject_id, student1_id,

Re: [PHP] Quick question regarding $_SESSION and header()

2008-12-11 Thread Dan Joseph
On Thu, Dec 11, 2008 at 2:01 PM, Ólafur Waage wrote: > I should be able to set a session var and then do a header redirect > right? Small bug regarding that and i just need to be sure. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Robert Cummings
On Thu, 2008-12-11 at 13:46 -0500, tedd wrote: > At 12:29 PM -0600 12/11/08, phphelp -- kbk wrote: > >Hey tedd --- > > > >Do I understand your structure correctly that you have something like: > > > >Courses (table) > >course_id, > >subject_id, > >student1_id, > >student2_id, > >student3_id, > >stu

[PHP] Quick question regarding $_SESSION and header()

2008-12-11 Thread Ólafur Waage
I should be able to set a session var and then do a header redirect right? Small bug regarding that and i just need to be sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Foreign Keys Question

2008-12-11 Thread tedd
At 1:48 PM -0500 12/11/08, Robert Cummings wrote: On Thu, 2008-12-11 at 13:27 -0500, Bastien Koert wrote: > On Thu, Dec 11, 2008 at 12:56 PM, tedd > > Does anyone have any example code to show me the actual syntax? > Joins should allow you to pull the data from the table in one query You w

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Robert Cummings
On Thu, 2008-12-11 at 13:27 -0500, Bastien Koert wrote: > On Thu, Dec 11, 2008 at 12:56 PM, tedd > > > > I believe I can create the Course table (excluding everything not germane) > > like so: > > > > INDEX (student_id), > > FOREIGN KEY (student_id) > > REFERENCES (students(id)), > > INDEX (ins

Re: [PHP] Foreign Keys Question

2008-12-11 Thread tedd
At 12:29 PM -0600 12/11/08, phphelp -- kbk wrote: Hey tedd --- Do I understand your structure correctly that you have something like: Courses (table) course_id, subject_id, student1_id, student2_id, student3_id, student4_id, Is that right? Ken Ken: That was right, but I think I've reconsi

Re: [PHP] PECL JSON package

2008-12-11 Thread Phil Ewington - iModel
Eric Butera wrote: On Thu, Dec 11, 2008 at 5:43 AM, Phil Ewington - iModel wrote: Phil Ewington - iModel wrote: Hi All, I have just installed the PECL JSON package, or at least think I have!! But how do I use it?? I was expecting /usr/share/pear/Services/JSON.php to be found on my sys

Re: [PHP] Foreign Keys Question

2008-12-11 Thread phphelp -- kbk
Hey tedd --- Do I understand your structure correctly that you have something like: Courses (table) course_id, subject_id, student1_id, student2_id, student3_id, student4_id, Is that right? Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] Foreign Keys Question

2008-12-11 Thread Bastien Koert
On Thu, Dec 11, 2008 at 12:56 PM, tedd wrote: > Hi gang: > > I know this is a MySQL question, but I get a better reply from this group > than the MySQL list (no offense meant to that list) -- In any event, here > goes. > > I currently have a project that's a classic example of a relational > data

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread tedd
At 11:23 AM -0500 12/11/08, Robert Cummings wrote: On Thu, 2008-12-11 at 11:05 -0500, tedd wrote: > When I say "Hack a site" I mean to do something to get the site to provide an unintended result as expected by the author. Much like using CSS "Hacks" to get browsers to do something that was

[PHP] Foreign Keys Question

2008-12-11 Thread tedd
Hi gang: I know this is a MySQL question, but I get a better reply from this group than the MySQL list (no offense meant to that list) -- In any event, here goes. I currently have a project that's a classic example of a relational database, namely the course, student, and instructor problem.

Re: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Eric Butera
On Thu, Dec 11, 2008 at 12:12 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > On Thu, Dec 11, 2008 at 8:25 AM, Eric Butera <[EMAIL PROTECTED]> wrote: >> >> On Thu, Dec 11, 2008 at 10:22 AM, Bastien Koert <[EMAIL PROTECTED]> wrote: >> > >> > >> > On Thu, Dec 11, 2008 at 10:15 AM, Eric Butera <[EMAIL

Re: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Nathan Nobbe
On Thu, Dec 11, 2008 at 8:25 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > On Thu, Dec 11, 2008 at 10:22 AM, Bastien Koert <[EMAIL PROTECTED]> wrote: > > > > > > On Thu, Dec 11, 2008 at 10:15 AM, Eric Butera <[EMAIL PROTECTED]> > wrote: > >> > >> On Thu, Dec 11, 2008 at 9:56 AM, Terion Miller <[EMA

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread Robert Cummings
On Thu, 2008-12-11 at 11:05 -0500, tedd wrote: > At 10:12 AM -0500 12/10/08, APseudoUtopia wrote: > >On Wed, Dec 10, 2008 at 10:03 AM, tedd <[EMAIL PROTECTED]> wrote: > > > In my mind, hacking a site (without doing damage) is a good introduction > > to > > > a client. > >> > > > >*Ahem*You m

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread Stut
On 11 Dec 2008, at 16:05, tedd wrote: At 10:12 AM -0500 12/10/08, APseudoUtopia wrote: On Wed, Dec 10, 2008 at 10:03 AM, tedd <[EMAIL PROTECTED]> wrote: > In my mind, hacking a site (without doing damage) is a good introduction to > a client. *Ahem*You mean 'cracking'? :-P *Ahem*.

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread tedd
At 10:12 AM -0500 12/10/08, APseudoUtopia wrote: On Wed, Dec 10, 2008 at 10:03 AM, tedd <[EMAIL PROTECTED]> wrote: > In my mind, hacking a site (without doing damage) is a good introduction to > a client. *Ahem*You mean 'cracking'? :-P *Ahem*... You mean to stick your tongue out at m

Re: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Eric Butera
On Thu, Dec 11, 2008 at 10:22 AM, Bastien Koert <[EMAIL PROTECTED]> wrote: > > > On Thu, Dec 11, 2008 at 10:15 AM, Eric Butera <[EMAIL PROTECTED]> wrote: >> >> On Thu, Dec 11, 2008 at 9:56 AM, Terion Miller <[EMAIL PROTECTED]> >> wrote: >> > Hey Everyone, I am wondering if using a framework such as

Re: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Terion Miller
On Thu, Dec 11, 2008 at 9:22 AM, Bastien Koert <[EMAIL PROTECTED]> wrote: > > > On Thu, Dec 11, 2008 at 10:15 AM, Eric Butera <[EMAIL PROTECTED]>wrote: > >> On Thu, Dec 11, 2008 at 9:56 AM, Terion Miller <[EMAIL PROTECTED]> >> wrote: >> > Hey Everyone, I am wondering if using a framework such as o

Re: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Bastien Koert
On Thu, Dec 11, 2008 at 10:15 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > On Thu, Dec 11, 2008 at 9:56 AM, Terion Miller <[EMAIL PROTECTED]> > wrote: > > Hey Everyone, I am wondering if using a framework such as one of these > may > > make my life easier, which do any of you use and what has been

Re: [PHP] Can GD make a JPG thumbnail of a PDF?

2008-12-11 Thread ceo
If system("convert -version") does nothing, it is probably erroring out. Mess around with exec and using 2>&1 to try to get the error message. It's going to boil down to paths and permissions. The PHP user probably doesn't have convert in $PATH. Use a FULL PATH for system/exec calls fo

Re: [PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Eric Butera
On Thu, Dec 11, 2008 at 9:56 AM, Terion Miller <[EMAIL PROTECTED]> wrote: > Hey Everyone, I am wondering if using a framework such as one of these may > make my life easier, which do any of you use and what has been your > experience with the learning curve of them? > I just put Cake on my local se

[PHP] Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Terion Miller
Hey Everyone, I am wondering if using a framework such as one of these may make my life easier, which do any of you use and what has been your experience with the learning curve of them? I just put Cake on my local server, basically I want to know which is easiest? LOL... Terion

Re: [PHP] PECL JSON package

2008-12-11 Thread Eric Butera
On Thu, Dec 11, 2008 at 5:43 AM, Phil Ewington - iModel <[EMAIL PROTECTED]> wrote: > Phil Ewington - iModel wrote: >> >> Hi All, >> >> I have just installed the PECL JSON package, or at least think I have!! >> But how do I use it?? I was expecting /usr/share/pear/Services/JSON.php to >> be found on

Re: [PHP] PECL JSON package

2008-12-11 Thread Phil Ewington - iModel
Phil Ewington - iModel wrote: Hi All, I have just installed the PECL JSON package, or at least think I have!! But how do I use it?? I was expecting /usr/share/pear/Services/JSON.php to be found on my system for include but not so. My system tells me I have 1.2.1 successfully installed but I

[PHP] PECL JSON package

2008-12-11 Thread Phil Ewington - iModel
Hi All, I have just installed the PECL JSON package, or at least think I have!! But how do I use it?? I was expecting /usr/share/pear/Services/JSON.php to be found on my system for include but not so. My system tells me I have 1.2.1 successfully installed but I cannot find any docs that tell

SV: [PHP] Variable name for constants?

2008-12-11 Thread Anders Norrbring
> ... and in that way, you can create the name of the constant as you > please: > > $VAR_IMG = 'HOME'; > define('IMG_HOME', 'pic.jpg'); > echo(constant('IMG_'.$VAR_IMG)); > > SanTa > > - Original Message - > From: "clive" <[EMAIL PROTECTED]> > To: "PHP LIST" > Sent: Thursday, December 1

SV: [PHP] Variable name for constants?

2008-12-11 Thread Anders Norrbring
> > I dont think you can do that with a constant, but you can do this a > > normal variable: > > > > I stand under correction form my previous email, it can be done: > > define('TEST', 'the value of constant TEST'); > > $var= 'TEST'; > > echo constant($var); This may be too early in the morn

Re: [PHP] Variable name for constants?

2008-12-11 Thread HostWare Kft.
... and in that way, you can create the name of the constant as you please: $VAR_IMG = 'HOME'; define('IMG_HOME', 'pic.jpg'); echo(constant('IMG_'.$VAR_IMG)); SanTa - Original Message - From: "clive" <[EMAIL PROTECTED]> To: "PHP LIST" Sent: Thursday, December 11, 2008 9:18 AM Subject

Re: [PHP] Variable name for constants?

2008-12-11 Thread clive
I dont think you can do that with a constant, but you can do this a normal variable: I stand under correction form my previous email, it can be done: define('TEST', 'the value of constant TEST'); $var= 'TEST'; echo constant($var); -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Variable name for constants?

2008-12-11 Thread clive
Anders Norrbring wrote: I've been experimenting with having a varaible constant name, but failed miserably... Can I please have a pointer? What I'm trying to do is something like this: $name = "home"; Then read the constant IMG_HOME, like IMG_$name, I'm not sure I make myself understood, but I

[PHP] Variable name for constants?

2008-12-11 Thread Anders Norrbring
I've been experimenting with having a varaible constant name, but failed miserably... Can I please have a pointer? What I'm trying to do is something like this: $name = "home"; Then read the constant IMG_HOME, like IMG_$name, I'm not sure I make myself understood, but I hope so.. Anders. --