Hello,
I'm having some issues with bool's relating to MySQL.
I am using:
$tvar = true;
$tvar = false;
in PHP, but only the TRUE value gets
accepted by the MySQL insert or update's.
It appears MySQL sees the TRUE value as 1..
because that is what shows up.. and that MySQL
throws an error when f
Daniel Brown wrote:
On Tue, Jan 25, 2011 at 17:05, Donovan Brooke wrote:
What is the best PHP practice when using bools with
MySQL? Save 1's and 0's instead of true/false?
You could either do an INT(1) DEFAULT 0 or an ENUM('Y','N') to
make it easier on you
Daniel Brown wrote:
On Tue, Jan 25, 2011 at 17:40, Donovan Brooke wrote:
Thanks Dan,
I think the error would still persist using DEFAULT.. because as mentioned,
I don't think MySQL likes:
UPDATE tablename SET vbool=
..which is not great news for me since I'd like to avoid havi
O.K., I give up.. I can't seem to find why this breaks the page to
a point where nothing gets displayed in the browser (no error reporting).
Sorry for any email line breaks:
---start-
if ($t_dataon) {
$query = "SELECT
s_sitename,s_logopath,s_headinfo,s_head_moreinfo,s_rightpic_pa
[snip]
print = "";
^
Never mind, found it. :-/
Donovan
--
D Brooke
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
to respond to some of the comments/questions..
No, it wasn't parsing anything... and yes, I put
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
at the top of the page.
(as well as there is a custom built PHP management app that
allows to turn on the display_errors.. whi
Hello,
I use mysql_real_escape_string() to
escape data for db population.
ie.
..form..
..recieving form input before db update..
$var =mysql_real_escape_string($var);
My question is regarding when wanting to allow HTML
within a database...
Will stripslashes also take out the slashes from so
Sorry, should have done some simple testing!.. It
appears that stripslashes is smarter than simply stripping
all "/".
So, my apologies for interrupting the class! ;-)
Donovan
--
D Brooke
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ethan Rosenberg wrote:
Dear List -
I have a form. In one field, the customer types the name of a product.
The first seven(7) results of the MySQL query that the entry generates
should be displayed as a clickable drop down list.
How do I do it?
Thanks.
Ethan
MySQL 5.1 PHP 5.3.3-6 Linux [Debia
Daniel Brown wrote:
On Sun, Feb 20, 2011 at 14:11, Nazish Zafar wrote:
$insert = "INSERT INTO user_info
(login, password)
VALUES
("$login", "$password");
You're using double-quotes to encapsulate your $insert variable
data, then never closing them. What's more, you're also using
double
Hello,
I took some PHP/MySQL code that seemed to be working fine from a LAMP
setup and brought it to a MAMP (mac OS) setup. Now I am seeing a
cache-like behavior in my admin forms, where my last changes don't "stick".
To be clearer, I go to make a database change in the forms I built to
admi
Jim Giner wrote:
So you're saying a page refresh in your browser doesn't cure the problem?
Hi, sorry for the delay.. Yes, page refresh/s is basically what I am
doing to get to the latest edits (by clicking in and out of the edit
area). Reloading the page one or more times works as well.
D
Jim Giner wrote:
With IE, a refresh is F5 or even better, ctrl-F5. Should always get the
latest updates. Or you could add:
header("Cache-Control: no-cache");
at the beginning of your php code.
Well, that works! :-/ (I'm embarrassed to say)
For some reason I over-thought that one.
Thx,
Do
13 matches
Mail list logo