Hey there,
I have a range of records that represent different faults and different
symptoms that I want to pull out of the database, and to find the
records that are the closest within each range.
I am currently doing it with a barrage of if statements, but I am sure
that this could be done
Aslan wrote:
Hey there,
I have a range of records that represent different faults and different
symptoms that I want to pull out of the database, and to find the
records that are the closest within each range.
I am currently doing it with a barrage of if statements, but I am sure
that this
Hey,
For ranges you can also use Between in the mysql queries.
SELECT * FROM table WHERE Type= Attainable AND Min LIKE $var can be
written as
Select * from table where between min and max
Just remember that between acts a bit wierd with dates or else Jim's
solution would be perfect for you.
Here's the info on the weirdness of between:
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_between
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
Hey,
For ranges you can also use Between in the mysql queries.
i am doing seo for a website and this website uses a lot of php for which i
need suggestions. this is how the website is set up.
in the index.php file there is a flash banner at the top of the page and the
center part is another file which is called using include(links.php) and
the bottom part
On Sat, 2008-07-19 at 11:57 +0530, Sudhakar wrote:
i am doing seo for a website and this website uses a lot of php for which i
need suggestions. this is how the website is set up.
in the index.php file there is a flash banner at the top of the page and the
center part is another file which
having gone through configure and compile hell getting php built on Mac OS X
Leopard I have
become a little more familiar with the intricasies of compiling software ...
undoubtly I
still have a heap to learn.
to that end I was hoping someone could shed some light on the following queries
1.
On Tuesday 18 September 2007, Andrew Ballard wrote:
I'm guessing that the answer to all of my questions is some how
wrapped up in visibility and overloading. Unfortunately I cannot find
any resource that documents the interactions. TIA.
As I understand it, the __get and __set do not
I've been doing a bunch of reading about objects and overloading in
PHP5, but I've got a couple of questions that I can't seem to find the
answer to online. Suppose the following code in PHP5.2.4:
?php
class foo {
public $x;
private $z = 'z';
public function __set
1) It seems that the getter and setter are not called on every single
call. For example, if I do the following:
$bar = new foo;
$bar-x = 'x';
There is no output. I would expect to see Setting $this-x to x.
Another example:
$bar = new foo;
$bar-y = 'y';
echo $bar-y;
I would expect
: Paul Goepfert [mailto:[EMAIL PROTECTED]
Sent: Friday, January 27, 2006 9:28 PM
To: php-general@lists.php.net
Subject: [PHP] questions regarding PHP and Forms
Hi all,
I am writing my first website in php. I have a few questions.
1) I need to do vaildation on form values that I have entered
At 05:39 PM 1/28/2006, Paul Goepfert wrote:
Thanks for the help everyone. I have decided to use javascript to
deal with my second problem. I understand that this is not a
JavaScript fourm but I am having some trouble getting my JS function
to work correctly.
Here is my JS code.
function
Hi,
I missed the start of the thread but it may be because you have a space in
rowing machine for the option.
Try rowing_machine or rowingmachine and see what happens.
(check your javascript console - in firefox type 'javascript:' in the
address bar without the quotes).
On 1/29/06, Miles
Hi all,
I am writing my first website in php. I have a few questions.
1) I need to do vaildation on form values that I have entered into a
form. Is there a way I can write the vaildation code on the same page
as the form in php?
2) I have a drop down menu on one of my form fields. What I
1) I need to do vaildation on form values that I have entered into a
form. Is there a way I can write the vaildation code on the same page
as the form in php?
Yes there sure is. :)
if (isset($submit)) {
// data validation etc.
}
else {
// display html form
}
2) I have a drop down
On Fri, 27 Jan 2006 12:28:07 -0700
Paul Goepfert [EMAIL PROTECTED] wrote:
I am writing my first website in php. I have a few questions.
1) I need to do vaildation on form values that I have entered into a
form. Is there a way I can write the vaildation code on the same page
as the form
: http://uptime.weberdev.com
PHP content for your site : http://content.weber-sites.com
-Original Message-
From: Paul Goepfert [mailto:[EMAIL PROTECTED]
Sent: Friday, January 27, 2006 9:28 PM
To: php-general@lists.php.net
Subject: [PHP] questions regarding PHP and Forms
Hi all,
I am
On Thu, 2005-12-15 at 22:24, Christopher Jordan wrote:
I think you've hit the nail on the head there, but I'm sorta glad the
subject's come up since I'm learning about a concept that I've not
used before. Is it mostly used for purposes of scalability? It seems
like it might be that way.
Robert Cummings [EMAIL PROTECTED] wrote:On Wed, 2005-12-14 at 21:34,
Christopher Jordan wrote:
Rob,
Thanks for responding. :) I have more questions. I hope
that's okay. :)
*lol* No problem :)
Thanks! :)
You said:
Share nothing refers to the PHP philosophy of not tying
any data
Jochem,
Thanks so much for your advice.
In the end, I managed to find why that little EZSql tool wasn't working for me,
and thus what I'm *really* putting into the session variable is an array.
I understand also that each user would get a copy of the same session
variables, but this is for a
On Wed, 2005-12-14 at 20:50, Christopher Jordan wrote:
When you said:
...the strength and simplicity of PHP stem from the decision to make/keep
PHP a 'share nothing' architecture.
What did you mean, by that? I've not heard of this share nothing
idea. What is the idea of share
Rob,
Thanks for responding. :) I have more questions. I hope that's okay. :)
You said:
Share nothing refers to the PHP philosophy of not tying any data
sharing system to the engine itself.
In this way developers are free to create applications in such a way that if
they need more power, they
On Wed, 2005-12-14 at 21:34, Christopher Jordan wrote:
Rob,
Thanks for responding. :) I have more questions. I hope that's okay. :)
*lol* No problem :)
You said:
Share nothing refers to the PHP philosophy of not tying any data
sharing system to the engine itself.
In this way
CF has an application scope - PHP does not.
the strength and simplicity of PHP stem from the decision to make/keep
PHP a share nothing architecture.
with regard to shoving stuff in the SESSION superglobal:
1. it not shared between requests by different users - meaning
that the SQL query you
On 12/11/05, Christopher Jordan [EMAIL PROTECTED] wrote:
Hi folks,
I'm a ColdFusion developer, but I'm branching out into PHP because alot
of my smaller clients don't want to pay for CF.
Anyway, a bit of background:
I've got a page that does a search on one of my tables. I'm
Hi folks,
I'm a ColdFusion developer, but I'm branching out into PHP because alot of
my smaller clients don't want to pay for CF.
Anyway, a bit of background:
I've got a page that does a search on one of my tables. I'm using Justin
Vincent's ezSQL
Not sure if I can give a good answer, but try doing a var_dump on
$_SESSION[Search Result] and see what you get. I suspect that it is
null. If that's the case then track down where it is getting assigned.
It should look something like $_SESSION[SearchResult] = $users.
Christopher Jordan
Hello, all -
I've got one more question for you all, which I don't quite understand.
What if, say, I'd like to develope an application which requires the use
of, well for simplicity, some SSL functionality.
I would distribute my PHP application, but then would provide compiled
modules for
First I'm a bit unsure , because in the manual it
states that you must use mysql_real_escape_string on
binary data. So first question, what constitutues
binary data, a file or just an integer?
Second question - Since magic_quote_gpc is enabled on
my server (and I have no choice) - I gather I
My thanks to both of you. I am trying to find out now how to
compile in the oci8 functions because it is not obvious in the list of
configuration selections.
When I do get those functions, I can probably use the
information from Marcelo so every bit helps.
Martin Towell writes:
I installed the FreeBSD port of php4.3.4. In order to query a
remote database server running Oracle8I, I am supposed to use oci
commands. I have a test script that one would think should do nothing
except briefly connect to the remote server:
#!/usr/local/bin/php
?
//Login to SQL
The ocilogon() function should have in third parameter
something like
$db=(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)
(HOST=HOST_HERE)(PORT=PORT_HERE)
)
)
(CONNECT_DATA=(SERVICE_NAME=DATABASE_NAME_HERE))
);
and two
-
From: Marcelo Pereira Fonseca da Silva
[mailto:[EMAIL PROTECTED]
Sent: Friday, 12 March 2004 2:46 PM
To: PHP
Subject: Re: [PHP] More php Questions about PHP 4.3.4 (cli)
The ocilogon() function should have in third parameter
something like
$db=(DESCRIPTION
[snip]
Question: Why doesn't the PHP community support using an Hungarian
style of programming if it prevents errors?? I've gotten too darn many
Haven't really seen this one flamed over on this list before, but maybe
someone will step in an freak out later on. At any rate, you make the
On Wed, 2003-06-11 at 05:21, Jay Blanchard wrote:
I think that part of the problem is that many PHP developers come to
programming from the largely self-taught web community (not that there
is anything wrong with that). They have never programmed before (doing
HTML and CSS is NOT programming)
[snip]
I'm not sure what your point is except to attempt to educate me that
coding standards are a Good Thing, which is rather obvious. My point is
that there has been no conclusive argument made that Hungarian notation
is a quantitatively better method than any other.
[/snip]
You are correct of
Ok - let the war begin...
Question: Why doesn't the PHP community support using an Hungarian style of
programming if it prevents errors?? I've gotten too darn many times now by a type
mismatch using what the 'Bible' of PHP programming style recommends - PHP Coding
Standard by Fredrik
At 01:34 11.06.2003, Sparky Kopetzky said:
[snip]
Ok - let the war begin...
no war at all...
Question: Why doesn't the PHP community support using an Hungarian style of
programming if it prevents errors?? I've gotten too darn many times now by a
It's
On Tue, 2003-06-10 at 16:34, Sparky Kopetzky wrote:
Ok - let the war begin...
Question: Why doesn't the PHP community support using an Hungarian
style of programming if it prevents errors?? I've gotten too darn many
Haven't really seen this one flamed over on this list before, but maybe
Began with one question, but some how I figure it out some stuff that I will need, and
before I forget to ask, better I'll do, and are from different topics related to the
php. No more than one message is sent, because the traffic on the list. Hope that in
some time I get the responde of my
Began with one question, but some how I figure it out some stuff that
I
will need, and before I forget to ask, better I'll do, and are from
different topics related to the php. No more than one message is sent,
because the traffic on the list. Hope that in some time I get the
responde
of my
I've been looking on PHP.net's manual for openssl functions but it
seems that they have very little information on the said functions. Ive
tried posting on mailing lists for some help but I havent been receiving
fruitful responses. Some even told me that it is very difficult to find a
The fact that tutorials are outdated using old code is not a good reason
to stick with it :)
I agree totally.
So I'm trying to use the $_Server variables but I continue to get this
error:
Parse error: parse error, expecting 'T_STRNG' or 'T_VARIABLE' or
'T_NUM_STRING' in blah, blah, blah on
Don't use quotes around the array index inside a quoted string.
-Rasmus
On 10 Nov 2002, Ray Seals wrote:
The fact that tutorials are outdated using old code is not a good reason
to stick with it :)
I agree totally.
So I'm trying to use the $_Server variables but I continue to get this
Uh, no. That makes it think it's a constant, which generates a notice.
Rasmus Lerdorf wrote:
Don't use quotes around the array index inside a quoted string.
-Rasmus
On 10 Nov 2002, Ray Seals wrote:
The fact that tutorials are outdated using old code is not a good reason
to stick with it
At 15:28 10.11.2002, Ray Seals said:
[snip]
Parse error: parse error, expecting 'T_STRNG' or 'T_VARIABLE' or
'T_NUM_STRING' in blah, blah, blah on line 33.
Here is the script that is doing this:
[...]
$sql = SELECT *
FROM
Uh, no. Your problem is obvious:
$sql = SELECT *
FROM users
WHERE username='$_SERVER[PHP_AUTH_USER]' and
password='$_SERVER[PHP_AUTH_PW]';
You have double-quotes inside a double-quoted string.
Like I said, don't use quotes around the array index inside a
I'm running PHP 4.2.3 as an Apache Module
When I try to use $PHP_AUTH_USER it returns nothing. But if I print out
$_SERVER[PHP_AUTH_USER] it prints the user name I tried.
All of the sample code and books that I have use the $PHP_AUTH_USER.
Can anyone give me some insight on what the difference
Try looking in the manual for register_globals. It's a setting in
php.ini that determines whether server variables are registered as
regular variables or not. The material you have probably expects it to
be turned on, whereas in more recent versions it has been turned off.
It's considered a
They contain the same data.
Newer versions of PHP (= 4.1.1 I think) make use of the new superglobal
arrays (like $_POST, $_GET, $_SESSION, $_COOKIE, $_SERVER, etc)... This way
of doing things is more secure, and will encourage smarter programming.
You can get the old behaviour back by changing
First of all, what exactly is get/set_magic_quotes_runtime? (I know what a
get/set function does, and I know what magic_quotes does, but I'm unclear
about what magic_quotes_runtime is as opposed to _gpc). Does it get the
magic_quotes setting at runtime, before anything has been
on 03/10/02 10:55 PM, [EMAIL PROTECTED]
([EMAIL PROTECTED]) wrote:
Secondly, is there any way of counting how long in pixels my page runs?
Basically, my situation is this: I want to know if my page runs more than a
screen and a half (or so... still deciding) of the user's screen so that I
U, it's too hard to tell -- if not impossible!! There are too many
variables... font size, leading, etc etc to calculate how long your page
will be and then you'd have to get information back about screen
size/resolution from javascript (yuk).
I thought there might be a way to compare
First of all, what exactly is get/set_magic_quotes_runtime? (I know what a
get/set function does, and I know what magic_quotes does, but I'm unclear
about what magic_quotes_runtime is as opposed to _gpc). Does it get the
magic_quotes setting at runtime, before anything has been
Hi
firstly, magic quotes have something to do with how your php server
interprets the embedded php commands, or at least that's what I took it too
be. I dont really know the details but it is definitely a setting in your
php.ini. Maybe you can research it to your needed detail from that.
mysql_insert_id() will tell you the number of last auto_increment
insert, you can use this, but you must keep it using session on the
server side for security reasons. But better solution be to use session
or hidden fields in your forms to pass the values from page to page and
insert them at
Hi,
I'm developing a web application that uses forms
for user input and then after each form is filled shows something like Welcome
Bob to our site ... bla. bla... inserts data in a table and on the same page
continues with the rest of the data, and goes to another form and so
on.
I have
You should search for some SQL tutorials on the Web.
What it sounds like you are looking for is the update SQL statement
which modifies an existing row (for your second form, for example).
Thus, you insert the row to create it (which assigns the key using the
auto increment), then update that
Thanks a lot.
The other day I have talked with one of my classmates and say that
there is nearly no essential differences between session and url
variables, after I read your answer I know that it does have.
I have tried your way of using session, it does make sense in differentiate
The php.ini directive session.gc_maxlifetime??
php.net/session is worth a read
Justin French
on 16/08/02 1:51 AM, mintbaggio ([EMAIL PROTECTED]) wrote:
Thanks a lot.
The other day I have talked with one of my classmates and say that
there is nearly no essential differences between
Hi, sorry if this is one of those oft-answered questions, but...
I am using the script below to upload a file to the server, however if I
upload a file, say, 'pamnude.jpg' then the tmp path, file name and file size
are returned but not the mimetype. Why could this be?
Also, I read about there
. The_RadiX
: [EMAIL PROTECTED]
: ABN: 64 235 749 494
: QUT Student :: 04475739
:::
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, May 05, 2002 12:18 AM
Subject: Re: [PHP] questions about a self-made mini chat
Hi there,
i have some questions to solve some problems, i recently encountered with my self made
mini chat script.
Ok, i use the meta-refresh in the main chat-messages frame to update the frame every
few seconds.
In windows OS, you always get that click sounds whenever it refreshes the frame.
On Saturday 04 May 2002 21:23, Duncan wrote:
Hi there,
i have some questions to solve some problems, i recently encountered with
my self made mini chat script.
Ok, i use the meta-refresh in the main chat-messages frame to update the
frame every few seconds. In windows OS, you always get
Thanks for the reply.
Oh, i just tried Opera 5.x and it messed up my whole script... lol,
actually, for no reason it added about 10 login entries to the database,
some matched the current one, others were from earlier logins with Opera.
I think this might be related to the cache, so i need to
I have a question about cookies,why is the time that the cookies
expired not same as the time that parameter of session.cookie_lifetime
set?
for example, I wanna the cookies expired 5 minutes later,what should I
do?I think I should set the parameter,as follow:
session.cookie_lifetime =
This is what I did when I installed PHP and I already had mySQL on my RAQ3i
and it worked like a charm, I hope this helps you, -- you can skip by the
mySQL install and move on the PHP install below.
Since mySQL for the RAQ3i (especially if you used the BIN from Cobalt)
doesn't have a directory
This is what I did when I installed PHP and I already had mySQL on my RAQ3i
and it worked like a charm, I hope this helps you, -- you can skip by the
mySQL install and move on the PHP install below.
Since mySQL for the RAQ3i (especially if you used the BIN from Cobalt)
doesn't have a directory
[EMAIL PROTECTED] wrote:
when I do am done downloading, it says to use:
./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr/local/mysql
--enable-track-vars --enable-trans-sid --enable-ftp
Ok, but I have mysql. Should I remove the --with mysql ...
If you want MySQL support in PHP you
On Fri, 2 Nov 2001, jennyw wrote:
I've signed up with a dedicated Web host that has PHP installed. The weird
thing is that there is no php.ini anywhere. Is the file optional? Everything
seems to be behaving okay.
I have several Web sites that I'm setting up. Is it possible to use
different
One exception, on the main page, I have "index.html" which is simply a
copy of "Index.php" renamed. This is so that requests to www.server.org/
will come up correctly.
Probably there's a place to fix that in apache, but I haven't gone after
it
yet.
There is a way to fix this on
Hello everybody,
I would like to ask you for some help with PHP. I am a
newbie both to the list and to PHP. I try to learn
from the books and manuals, but there are some things
I do mnot understand and I can't read it anywhere in
the books.
Please take a moment and reply to my mail. I know that
]
Subject: [PHP] Questions about simple php problems
Hello everybody,
I would like to ask you for some help with PHP. I am a
newbie both to the list and to PHP. I try to learn
from the books and manuals, but there are some things
I do mnot understand and I can't read it anywhere in
the books.
Please
Any of you guys care to enlighten this fellow any further than me?
Please reply to the list, not me :)
Gfunk - http://www.gfunk007.com/
I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
- Original Message
I think it's just "test.html", although I am not 100%
sure. I will check that. Maybe this is the reason...
I hit this early on too.
I write my code on a windows machine, and upload it using cute-ftp to the
server, which is linux.
I started out trying to make files like "file.ext" on windows,
--- Josh G [EMAIL PROTECTED] wrote:
Any of you guys care to enlighten this fellow any
further than me?
Thank you for your reply. It helps a lot. Thanks to
everyone who took this effort to reply to me. I just
try to learn and taklking to experienced people seems
a good wayto learn.
Please
Here's what my normal "Index.php" looks like.
? include($DOCUMENT_ROOT . "/headmeta.inc")? ? include ("Header.inc")?
? include("Index.inc") ? ? include($DOCUMENT_ROOT . "/Footer.inc") ?
? include($DOCUMENT_ROOT . "/Do_webtrends.php") ?
Well.. the mailing list munged it..
I can email you a
101 - 177 of 177 matches
Mail list logo