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.
--
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
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
... 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 php-general@lists.php.net
Sent: Thursday, December 11,
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 morning for me,
... 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 php-general@lists.php.net
Sent: Thursday,
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
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
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 my system for
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
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 server,
If system(convert -version) does nothing, it is probably erroring out.
Mess around with exec and using 21 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 for
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 your
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 one of these
may
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 one of these
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 me?
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*...
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 mean 'cracking'? :-P
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 [EMAIL PROTECTED]
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 PROTECTED]
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
database, namely the course, student, and instructor
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
On Thu, Dec 11, 2008 at 12:56 PM, tedd tedd.sperl...@gmail.com 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
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,
etc.
Is that right?
Ken
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Eric Butera wrote:
On Thu, Dec 11, 2008 at 5:43 AM, Phil Ewington - iModel
phil.ewing...@i-model.co.uk 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
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,
etc.
Is that right?
Ken
Ken:
That was right, but I think I've
On Thu, 2008-12-11 at 13:27 -0500, Bastien Koert wrote:
On Thu, Dec 11, 2008 at 12:56 PM, tedd tedd.sperl...@gmail.com
I believe I can create the Course table (excluding everything not germane)
like so:
INDEX (student_id),
FOREIGN KEY (student_id)
REFERENCES (students(id)),
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 tedd.sperl...@gmail.com
Does anyone have any example code to show me the actual syntax?
Joins should allow you to pull the data from the table
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
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,
student4_id,
etc.
Is
On Thu, Dec 11, 2008 at 2:01 PM, Ólafur Waage olaf...@gmail.com 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:
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,
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 tedd.sperl...@gmail.com
Does anyone have any example code to show me the actual syntax?
On Thu, Dec 11, 2008 at 14:01, Ólafur Waage olaf...@gmail.com 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
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
(Forwarding back to PHP General for the archives.)
On Thu, Dec 11, 2008 at 14:31, Ólafur Waage olaf...@gmail.com wrote:
Its fixed, thanks guys :)
On Thu, Dec 11, 2008 at 7:16 PM, Daniel Brown danbr...@php.net wrote:
On Thu, Dec 11, 2008 at 14:01, Ólafur Waage olaf...@gmail.com wrote:
I
Whoops, sent the thanks to the wrong list :P
On Thu, Dec 11, 2008 at 7:33 PM, Daniel Brown danbr...@php.net wrote:
(Forwarding back to PHP General for the archives.)
On Thu, Dec 11, 2008 at 14:31, Ólafur Waage olaf...@gmail.com wrote:
Its fixed, thanks guys :)
On Thu, Dec 11, 2008 at 7:16
-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, Bastien Koert
On Thu, Dec 11, 2008 at 2:32 PM, tedd tedd.sperl...@gmail.com 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
Hi.
I have the following test db/tbl setup.
stateTBL
+--+
| stateName|
| stateID |+
+--+ V
V
V
collegeTBL V
+--+ V
| collegeName | V
| stateID |+
| collegeID|+
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
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 mechanism. I
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 concurrency,
On Fri, Dec 12, 2008 at 7:03 AM, tedd tedd.sperl...@gmail.com 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.
'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
'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,
On Fri, 2008-12-12 at 10:59 +1300, German Geek wrote:
On Fri, Dec 12, 2008 at 7:03 AM, tedd tedd.sperl...@gmail.com 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
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
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 bedoug...@earthlink.net wrote:
Hi guys.
Architecting an app that's going to have users interacting with different
levels of the
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 the
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
'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
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:
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
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 gm...@colin.guthr.ie wrote:
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.
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 rob...@interjinn.comwrote:
It's
How serialize DOMDocument object?
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's
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 does not
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
61 matches
Mail list logo