session vars and destroys the session then header()ing
back out to the login page... however... no matter what login i try... it
always saves the session values fromt he first session...
i am having a terrible time killing the session
someone please please help me...
thank you,
jay merritt
Does anyone have a good php script that will test (i.e. benchmark) my MySQL
machine and my Web server?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have the "output_handler = ob_gzhandler" turned on in the php.ini file so
it will automatically compress all my pages. I was just wondering what is a
good zlib.output_compression level to put it on or is the default (4kb) a
good size?
thanks!
--
PHP General Mailing List (http://www.php.net/
Hello-
I'm running Engarde Linux v1.2 (a secure version of Linux) and it has PHP
4.0.6 installed on it as default (if asked I will explain why it's such an
old version). When I run Apache's "ab" command the results I am getting in
return are not very good. Almost 10 seconds for a script to run.
When you define a new class can you do the following?
$className = "Parent";
class $className {
};
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I was wondering can I create a new Object inside of a different class?
class One
{
//constructor
function One
{
$this->two = new Two;
$this->test = $this->two->test();
}
}
Can you do that? If so is that how you do it?
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
I just installed php 4.2.1 and i have a couple of URL's that pass variables
through links (www.domain.com/index.php?test=123) and when I run that it
comes up on the next page and the test variable is empty? I can't figure
this out but if I had to guess I would think it's some setting in the
php.i
data in URL
PHP now comes with register_globals set to OFF by default, as far as I'm
aware. You can access the variables using $_POST['variable'] and
$_GET['variable'], or turn register_globals back ON. :o)
Martin
>>> "Jay" <[EMAIL PROTECTED]>
What does the ++ do? Why ++ and not just one +
Thanks
-Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have created a table which has a column called cost. How do I add up all
the numerical data in the cost column and display that on a webpage?
-Thanks
-Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
For me, using FastTemplate & calling back the same script is the best idea.
Using flags, you can have a different response by using a different
template, yet retain all the POST data.
HTH,
At 03:49 AM 10/22/2001, Chip Landwehr wrote:
>I got a form that a user fills out. When they hit submit t
Hi!
Can someone pelase help me to convert the following Vbscript code to
PHP, i am really sucky at Regular Expression:
-CODE VBSCRIPT-
Function IsValid(strData,blIncludeAlpha,blIncludeNumeric)
Dim regEx, retVal,strPtrn
Set regEx = New RegExp
If blIncludeAlpha Then
strPt
Jason Wong wrote:
On Thursday 29 July 2004 17:00, Jay wrote:
Can someone pelase help me to convert the following Vbscript code to
PHP, i am really sucky at Regular Expression:
Why don't you state your problem in English so that even those people not
familiar with VB will understand and thu
Ni Shurong wrote:
I did not test it:)
function isValid($strData, $bIncludeAlpha=false, $bIncludeNumber=false)
{
switch(true) {
case $bIncludeAlpha && !$bIncludeNumber:
$ptr = "/^[a-zA-Z]+/";
break;
case !$bIncludeAlpha && $bIncludeNumber:
$ptr
Hi!
I am trying to list all files and dirs in a directory. But i encountered
some problems with is_dir() function. is_dir tells med that it all is
files when i know for a fact that there is one dir in the directory
("dir1"). Can someone tell me why this don“t work?:
";
}
Ni Shurong wrote:
you must do it like this:
";
}
}
closedir($handle);
clearstatcache();
}
?>
Ni Shurong <[EMAIL PROTECTED]>
MAIL : [EMAIL PROTECTED]
QQ : 412844
MSN : [EMAIL PROTECTED]
BLOG : http://blog.njmars.com/myhan/
You again!
Thanx : )
Ni Shurong wrote:
Hi,
I am a newer of this list, nice to meet every body here:)
I am wandering about using apache1 or apache2 with php, and i hope i can
get some advics here ;)
I use ./configure --help and it says:
--with-apxs2[=FILE] EXPERIMENTAL: Build shared Apache 2.0 module.
FILE is the
Hi!
I have a BIIIG problem with GDI. I try to use some functions on a .gif
image and now i need to install GDI. How do i install gd 2.0.28 on my XP
machine.
I use Win XP, Apache 2.0.50 and PHP 4.3.8
Thanx in advance
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
Hi!
Is there any class, functions etc that will convert old HTML to XHTML.
I want to send in some HTML text and get XHTML back.
e.g: the following would be converted:
in="hello"
out="hello"
or something like that.
Any opensource, commercials?
Thanx In Advance
Jay
--
PHP
Christian Stocker wrote:
On Wed, 04 Aug 2004 14:57:45 +0200, Jay <[EMAIL PROTECTED]> wrote:
Hi!
Is there any class, functions etc that will convert old HTML to XHTML.
I want to send in some HTML text and get XHTML back.
try tidy as external tool, or even better the tidy extension as nati
Jay Blanchard wrote:
[snip]
Is there any class, functions etc that will convert old HTML to XHTML.
I want to send in some HTML text and get XHTML back.
e.g: the following would be converted:
in="hello"
out="hello"
[/snip]
Have you searched phpclasses.org? Google?
Yes i have s
Justin Patrin wrote:
On Wed, 04 Aug 2004 19:02:41 +0200, Jay <[EMAIL PROTECTED]> wrote:
Jay Blanchard wrote:
[snip]
Is there any class, functions etc that will convert old HTML to XHTML.
I want to send in some HTML text and get XHTML back.
e.g: the following would be converted:
in="
Hi!
Found the following code in the PHP manual:
$text = "http://www.somelink.com";;
echo(ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"\\0", $text));
What does \\0 means, i have seen this before with \\1 and \\2
what does th
"text-align:left;\"";
$xhtml = preg_replace($patterns, $replacements, $html);
Thanx In Advance
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
= "/align=\"left\"/";
>>
>>$replacements[0] = "";
>>$replacements[1] = "";
>>$replacements[2] = " style=\"text-align:left;\"";
>>
>>$xhtml = preg_replace($patterns, $replacements, $html);
>>
&g
= "/align=\"left\"/";
>>
>>$replacements[0] = "";
>>$replacements[1] = "";
>>$replacements[2] = " style=\"text-align:left;\"";
>>
>>$xhtml = preg_replace($patterns, $replacements, $html);
>>
&g
Wudi wrote:
> On Wed, 18 Aug 2004 10:42:54 +0200
> Jay <[EMAIL PROTECTED]> wrote:
>
>
>>Hi!
>>
>>Why can? i get this code to work:
>>$html = $_POST["htmlIn"];
>>
>>$patterns[0] = "//";
>>$patterns[1] = "//
Hi!
Is there a ready to use PHP function for including ONLY if the file exists?
I tried it like this:
[main.php]
include_once("lib.php");
later
includeIf("somefile.php");
[lib.php]
function includeIf($filename)
{
if (!file_exists($filename))
{
include_once($filen
; $bIncludeNumber:
$ptr = "/^[0-9]+/";
break;
case $bIncludeAlpha && $bIncludeNumber:
$ptr = "/^[a-zA-Z0-9]+/";
break;
default:
return false;
}
return preg_match($ptr, $strData);
}
Hi.
I have a script that creates a folder and a bunch of jpegs... however
instead of creating them into the user/group I'm in (let's call it
"myGroup") it creates them into "Nobody". The problem becomes that when I
ftp in to delete the files and idenitfy myself as myGroup, it fails to
delete any o
Hi.
I have a script that creates a folder and a bunch of jpegs... however
instead of creating them into the user/group I'm in (let's call it
"myGroup") it creates them into "Nobody". The problem becomes that when I
ftp in to delete the files and idenitfy myself as myGroup, it fails to
delete any o
Hi. I have a script that creates a folder and a bunch of jpegs... however
instead of creating them into the user/group I'm in (let's call it
"myGroup") it creates them into "Nobody". The problem becomes that when I
ftp in to delete the files and idenitfy myself as myGroup, it fails to
delete any of
> Use the php ftp functions to create directories and move uploaded
> files would be one way.
>
> --
> regards,
> Tom
Move the uploaded files? You mean create the directory in the wrong spot and
then move it to the right spot? and the same with the files?
--
PHP General Mailing List (http://www
sorry but i'm trying to avoid putting my ftp login in password directly into
my script. i should have mentioned that earlier.
any other ideas?
"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Thursday, March 11, 2004, 5:52:08 PM, you wrote:
> >> Use the php ftp f
ED]> wrote in message
news:[EMAIL PROTECTED]
> Hello Jay,
>
> Thursday, March 11, 2004, 8:04:36 AM, you wrote:
>
> J> sorry but i'm trying to avoid putting my ftp login in password directly
into
> J> my script. i should have mentioned that earlier.
>
> Unless y
I have a php page, with a form I am attempting to submit.
In submitTest.php, I simply put
Yet, I continually get the browser message:
"Notice: Undefined variable: Test in ...\submittest.php on Line 2
1. Any reason that I can not pass the variable to the submit page? I am
using an A
The easiest way for me to explain and understand OOP was to think of it this
way.
You have an object and in that object contains functions that only pertain
to that one object. See diagram below.
Object1
|
|_ function1
|
|_ function2
.
.
etc
Object2
|
|_ function1
|
|_ func
You have to use JavaScript for this.
Sorry! but i've asked the same question on here a long time ago :)
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 11:22 AM
Subject: [PHP] Detecting resolution
> Does anyone know how to detect th
can anyone tell me why this while loop fails?
==
while ($row = mysql_fetch_array($sql_result)):
$phone = $row["phone"];
$date = $row["date"];
if ($phone == "$_POST[areacode]$_POST[prefix]$_POST[suffix]"):
if ($date == NULL):
$date = "today";
I was running fileperms() function to find out what a directory is chmod'ed
to. However, this doesn't return anything because it has to check a file.
My question is there a function that will return what a directory is
chmod'ed to?
Thanks!
Jay
--
PHP General Mailing List (htt
[snip]
> Your intention is a little foggy.
> PHP is server side, it works through the web server, thus Apache
> parses the
> scripts, so no, it can't.
>
> If you mean scripts on one box, database on another, no problem.
>
> Miles Thompson
>
> At 09:20 AM 7/1/20
[snip]
Can't figure this out... whenever I try to use any mysql functions or
anything, I get problems. PHP throws a DNS error... what's up with that?
[/snip]
Hey,
Give us some more information and we might be able to start helping you.
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
-Original Message-
From: Michael A Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 1:40 PM
To: Jay Blanchard
Subject: RE: [PHP] PHP5 - Bugs
I'm running on a RH9 box with Apache2. Going to pages that include the
PEAR::DB file throw DNS errors, but much simpler pages d
page is POSTED. Does this make sense? Not enough
caffeine for me yet...
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ubject comes up often.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e for me yet...[/snip]
So basically I need to have 2 versions of the first page, is that right?
:)
[/snip]
Not really, test for emptiness of the variable (isset())...if it is set
display it, if not show it as blank.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
ed to hold the variables (a GET). For
instance
Click Here
$_GET['name'] is equal to "Gary"
You can do it for more than one variable...
Click Here
$_GET['name'] is equal to "Gary"
$_GET['address'] is equal to "Chicago"
HTH!
Jay
--
PHP
[snip]
there are php user groups
hmmm... there should a listing for that.
someone should start a list...
i wish there was one near me...
[/snip]
If we knew where you were we might be able to point you in the right
direction.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
to make a round trip to the server each time this sounds
like a job for **ta-dat-ta-dah!** JavaScript!
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the moment.
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
this is probably not a bug.
Second, where is the code that tests for the condition? Do the other
IP's in the array output their id properly in this same set? This info
will help us to solve the problem.
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
me four!
Couldn't resist, and I loke the top posty thingie too.
JB
-Original Message-
From: Dan Anderson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 7:39 AM
To: PHP4 Emailer
Cc: Richard Baskett; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP forum
me three!
j/k.
-Dan
On Wed,
Having STFM I am wondering if anyone knows of a quick antithesis to
array_unique? We have an array in which we need to return all duplicate
values instead of the non-duplicates.
Thanks
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
(but I am
looking forward to an updrade!).
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Suprisingly MySQL is very good, as the others have said... I've been
involved in a few sites that have been known to hammer the DB pretty
hard.. And it's stood up to the test... Hmmm... I am sure others here
can validate this... But I think the size limit for the database is
about 4 gigs!!!
[snip]
I have a form, and I want to display all the form variables on the
target page - without having to use separate print statements for each
variable.
[/snip]
print_r($_POST);
or
print_r($_GET);
hth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/u
over a modem. I
would like to automate the process as much as possible. Any help would
be grandly appreciated.
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Umm, use exec() to call the dialing program?
[/snip]
That works on the surface, but the PPP program returns some vital
information about its connection status that is required for use by any
subsequent file operations. The information is returned via STDOUT.
Thanks!
Jay
--
PHP General
[snip]
Just wondering if there's a clear screen function in PHP like the
clrscr()
in 'C'.
[/snip]
If you are running PHP from the command line on a *nix or BSD box you
could...
exec("clear");
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
ebug' '--enable-track-vars'
'--with-zlib' '--with-mysql=/usr/local' '--prefix=/usr/local/'
'--enable-ftp' 'i386--freebsd4.5'
in the configuration
Maybe I should just call it a day and start over on Monday.
Would someone please point
[snip]
... all of it ...
[/snip]
required installing the jpeg library first, png second, then gd
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
text file (keep in mind that I know nothing about
databases)?
[/snip]
Go to http://www.evolt.org and search for the ABC's of CMS articles. It
is a good basic set for setting up a simple CMS using PHP and a database
(in this case MySQL)
HTH!
Jay
--
PHP General Mailing List (http://www.ph
h. I have tried many things to get the graph to
appear in the spreadsheet, but to no avail. Can someone point me in the
right direction?
A huge thanks in advance!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
redirect to
open.
We can open a frameset, showing the tab delimited Excel file in one
frame and the graph in another. Not very elegant, but if push comes to
shove...
Thanks!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
I'm wondering if there's any crazy dude out there that would like to
join me in making a class for PHP to convert Mp3's to Mp3Pro.
[/snip]
Have you looked at sourceforge.org, search for mp3 a wealth of stuff
is there
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
[snip]
i'm not sure but i think a tag in html is available which name
and
[/snip]
You can also put your code between tags (pre-formatted text)
I do this to display pre formatted text in text area boxes
title); // article title
?>
By: name); //article author ?>
Published: publish); //art
[snip]
I have a quick question about PHP and HTML. I have a page that is
supposed to update the "status" of hosts by pinging each host and
displaying the result. I would like to get the page to the point that I
can have something (either PHP or JavaScript or the like) ping every 10
seconds or
When echoing html code that will include variables from a while or if loop,
which method is best?
Method 1: echo "$employer";
OR
Method 2:
If you would, please give reasons why to support your opinion.
Thanks
--
Jay Fitzgerald, Design Director - CPW-A, CPWDS-A, CPWDV-A, CECM-A, CWC
[snip]
What I would like to do is to make an optional page that can print
information to a specified printer. Can PHP do this?
If so how???
[/snip]
Start by RTFM at http://us3.php.net/printer
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.
[snip]
How can I make them have at least 2 decimal places?
[/snip]
RTFM at http://www.php.net/number_format
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
When using something like this:
LOAD DATA LOCAL INFILE '/tmp/phpKBjUWb' INTO TABLE `indoma` FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\r\n'
How do I also insert a field not in the CSV. For example there are 8
fields
in the CSV and 9 in the table. I want the ninth field to be the name
[snip]
I would like it at least 2 decimal places.. So, 5.2670 would be 5.267
not
5.27:
[/snip]
RTFM for formatted string http://us3.php.net/sprintf or
http://us3.php.net/printf
HTH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Why is the font tag evil and depreciated ???
[/snip]
This topic is better suited to an HTML or web-dev list, but the bottom
line here is that CSS has been put into use as further effort to
seperate design from content. The CSS recommedation being in place
deprecates a lot of the old in-line
[snip]
Hello all:
I am having a hard time with a small piece of code. I was wondering
if someone may be able to explain why the following code will not
work... I
have been scratching my head for a few hours now and I am stumped.
http://someplace.com";);
if( ! headers_sent())
header("Locat
[snip]
Yes, I'm still screwing around with this stupid redirection thing, and
either I'm just a total idiot or there are some serious problems with
PHP. I have now tried to do it another way and - yes - you guessed it.
It does not work.
I mean really, it can not be this hard to redirect a user to
[snip]
Hello. I am building a webpage for a sorority-
http://www.olemissaoii.com .
I built a basic php script where they add the sisters and their names,
grad.
date, and email. Is there anyway to build a page that shows all the
fields
where someone could go in and edit/add what they need? What
[snip]
The content would go here.
Now, when I try to reference the subnav variable in the inHeader.php or
incFooter.php files, it comes up blank. I am basically trying to adjust
the
navigation on each page depending on the page I am on. I am just
learning
PHP, have programmed in ColdFusi
[snip]
Lets pretend I have this array called myStuff. If I add two elements to
myStuff and call the count function, I will get a result of 2. My
question
is how do I re-initialize the array after adding elements so when I call
the
count function on the array, I get a result of 0.
[/snip]
If you ad
[snip]
<-incHeader.php-->
[Site Name]
home
<-incHeader.php-->
[/snip]
home");
}
?>
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
What is different about the code that you wrote except that you have the
html being output by php?
[/snip]
I just cleaned it up some, used non deprecated formatting tags and sis
it all in one shot.
HTH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php
TF-8&oe=UTF-8&q=PHP+jokes (which,
BTW has a link to PHP + XML as its first linkFreud?)
It's just too bad that the subject wasn't "HELP ME!" :-)
Thanks for the smile!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Quit horsing around fellas, what if the developers take interest in this
thread and decide it's a good idea to release PHP6 with cranial
electrodes that will detect "what I want to do", and instead of me
having to code the application, PHP will just spit out the
application... That way our b
[snip]
> Is there any php book that discusses general design issues for cms's
and
> webservices in php?
[/snip]
http://www.glasshaus.com has a book on CMS, but it is fairly general.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
I found out that it works fine without the submit button that I had in
there.
When I take the submit button out, it works, if I put it back in there I
get
the error message again.
Any ideas?
[/snip]
Are you naming the submit buttons? Not just value, but id or name? You
must keep them se
[snip]
And since it probably isn't, can someone suggest a language that would
cover this subject?
[/snip]
JavaScript or any other client-side magic.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
$person = mysql_query("Some Statement Here");
if (!$person || $person == 0 || $person == '' || $person == '0') {
$result =
1; }
else { $result = 4; }
If the SQL statement returns an empty set, shouldn't $result be equal to
1?
Instead, I'm getting $result = 4.
[/snip]
Actually I think we n
[snip]
Here's the SQL - I tested it via command line and it comes back empty
set.
SELECT ID FROM tblItems WHERE number = $place
>
> [snip]
> $person = mysql_query("Some Statement Here");
>
> if (!$person || $person == 0 || $person == '' || $person == '0') {
> $result =
> 1; }
> else { $result =
[snip]
...lots of stuff...
[/snip]
What I forgot to say is that basically you were testing for query
execution, not the number of rows returned from the database. If you
want to test the number of rows or some other result from the query you
have to go further.
HTH!
--
PHP General Mailing List
[snip]
I know. I first tested for !$person but got the TRUE result when I
should
have received FALSE (empty set).
Why would that be?
I added '0' and such just to see if I wasn't thinking straight. :\
-Mike
[/snip]
If the query executes it will return TRUE for $person, so
if(!$person) woul
[snip]
Off hand, I would agree. And that is what I would expect.
However, the *exact* same setup on a different server gives me a result
of
'FALSE' properly. The other server has php 4.3.3 on it - the one giving
the
improper response has php 4.1.2.
Could this be the issue?
[/snip]
It sounds un
[snip]
I wonder why the heck the author didn't just go for the alternative
syntax with proper end-tokens and get the added value they deliver.
[/snip]
At the risk of stepping of of the curb into the holy-war that rages
about this the answer Mike is that a lot of PHP coders are what as known
as "ol
[snip]
I'm new to php and web development in general. I've toyed with ASP a
little
and enjoyed using "include" statements to include my navigation and
heading
pages. Does PHP provide a similar statement, or is there something else
I
can do to achieve this effect?
[/snip]
*sigh* RTFM at http://ww
[snip]
$which_person = mysql_query("SELECT ID FROM tblItems WHERE number =
$place");
$vthere = mysql_num_rows($which_person);
if ($vthere == '0') { True } else { False }
What should this return? True or False?
[/snip]
If there is one or more rows returned by the
[snip]
I did the var_dump and got:
bool(false)
While $vthere (from my previous post) returns 0 (zero) still. :\
But proceeds as if 0 were a false statement when asked if $vthere equals
zero. :\
-Mike
[/snip]
Is the query executing properly? Try this ...
$sql = "SELECT ID from tblItems WHERE
[snip]
Nothin' wrong with the SQL statement - it executes properly when I enter
values that actually pull something from a table. When I enter values
that
are not present in the table, I go on to have the other issue of it
looking
like it is false, though it is not. :\
[/snip]
But you are testin
[snip]
> I still want to know what you need to do, test for query execution or
> value? It is pretty cut and dried after that.
Value. If there is nothing found in the table that matches, do one
thing.
If there is, do another. :)
[/snip]
Then you must test for something returned, not whether or
[snip]
I did! Look at this again:
$which_person = mysql_query("SELECT ID FROM tblItems WHERE number =
$place");
$vthere = mysql_num_rows($which_person);
if ($vthere == '0') { True } else { False }
Yet it still returns as if this is FALSE (i.e. it executes the el
[snip]
if ($vthere == '0') { True } else { False }
> if ($vthere == 0) { True } else { False }
Same result (actually, that was the first statement I tried). :\
[/snip]
Then the query is failing.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
[snip]
And when I plug values into the query at command line - values that
would
return an empty set, it executes and returns an empty set.
[/snip]
If the query is returning an empty set the value of
mysql_num_rows($person) == 0
so
$person = mysql_query("The Query");
$thecount = mysql_num_rows($
[snip]
> $person = mysql_query("The Query");
> $thecount = mysql_num_rows($person);
> echo "$thecount \n";
>
> And tell us what $thecount is...
Returns 0 (zero).
[/snip]
Then
if($thecount == 0){
$whatever = 1;
} else {
$whatever = 4;
}
$whatever should be 1
--
PHP General Mailing List (
1 - 100 of 3770 matches
Mail list logo