# Problems with mysql_connect and/or mysql_select_db - Page 2

•  Subject
• Author
• Posted on

## Re: Problems with mysql_connect and/or mysql_select_db

Thomas 'PointedEars' Lahn wrote:

Ups, of course (deMorgans)! I really should have gotten that right, I'm
usually pretty good at boolean algebra.

Indeed, I hope so, but obviously I still have a lot to learn.

## Re: Problems with mysql_connect and/or mysql_select_db

~(E_ALL & E_STRICT) is equivalent to ~E_ALL | ~E_STRICT.

De Morgan:

~(P & Q) = ~P | ~Q

~(P | Q) = ~P & ~Q

You've put "and" instead of "or".

Ivan

## Re: Problems with mysql_connect and/or mysql_select_db

Ivan S wrote:

And E_ALL | E_STRICT is equivalent to ~E_ALL | ~E_STRICT:

111011111111111 (E_ALL)
| 000100000000000 (E_STRICT)
= 111111111111111

000100000000000 (~E_ALL)
| 111011111111111 (~E_STRICT)
= 111111111111111

Therefore, ~(E_ALL & E_STRICT) is equivalent to E_ALL | E_STRICT.  q.e.d.

PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.

## Re: Problems with mysql_connect and/or mysql_select_db

wrote:

That's true in that particular case, but in logic that is not true (or
you could say that is true for one particular interpletation of the
formula).

Ivan

## Re: Problems with mysql_connect and/or mysql_select_db

Ivan S wrote:

It is generally true in logic, too, because that equivalence requires the
operands (here: E_ALL and E_STRICT) to be disjunct, a fact that you still
seem to miss.

B = NOT(A) <--> NOT(A AND B) = NOT(A) OR NOT(B) = A OR B

Need proof?

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.

## Re: Problems with mysql_connect and/or mysql_select_db

wrote:

I don't need proof, thank you, but I know logic very well.

In your case, right logic would be: ~(A AND ~A) = ~A OR ~~A = ~A OR A
=3D A OR ~A (=3D TRUE). And that's why your equivalence is valid.

Nevertheless, I wasn't talking about any particualar case, but in
general (what you still seem to miss :) ). And in general your logic
is broken because this two formulas are not equivalent:

NOT(A) OR NOT(B) = A OR B

Have a nice day. :)

Ivan

## Re: Problems with mysql_connect and/or mysql_select_db

Ivan S wrote:

Exactly.

Straw man.  If you had paid attention, you would have noticed that I
knew/know very well that it does not work for any value.  *You* tried to
introduce the need for a tautology into this discussion, for whatever
reason.  Perhaps trolling.

EOD

PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.

## Re: Problems with mysql_connect and/or mysql_select_db

Ivan S wrote:

Ivan, don't argue with the troll.  He's not worth it and it will just

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

## Re: Problems with mysql_connect and/or mysql_select_db

If error reporting is strict, then it will tell you if you are trying
to read from a variable that does not exist. If no field called
"ptest" is posted, then there will be no \$_POST["ptest"].
You should be doing something like:
\$_SESSION["stest"] = (isset(\$_POST["ptest"]))?\$_POST["ptest"]:'';

## Re: Problems with mysql_connect and/or mysql_select_db

Captain Paralytic wrote:

Thanks for your reply! The question is now: "How do you disable error
reporting or at least disable the warnings?" More specifically, what is
the correct syntax (see my other post for the things I have already tried)?

Yes, Thomas wrote this as well and I shall use that in the future. ;)