Re: [PHP-DB] Forms : Validating user input is integer

2001-04-08 Thread Boclair

Manuel,

Manuel Lemos [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| Hello boclair,
|
| On 05-Apr-01 01:58:24, you wrote:
|
| I have a problem with a user input in a form required to be an
| integer, creating a variable for a mysql query.
|
| I have instances where integer, 0, is being typed as letter,o.
|
| You may want to try this PHP form generation and validation class
that does
| exactly what you need and more.
|
| http://phpclasses.UpperDesign.com/browse.html/package/1
|
|
| It does both client and server side validation.  For the client side
it
| uses the isNaN(parseInt(value)) Javascript functions.  For the
server side
| it uses the strcmp($value,strval(intval($value))) PHP functions .
|
|
| Regards,
| Manuel Lemos
|
| Web Programming Components using PHP Classes.
| Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
| --
| E-mail: [EMAIL PROTECTED]
| URL: http://www.mlemos.e-na.net/
| PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp

I downloaded the files and am studying them.

Certainly comprehensive.

Many thanks

Tim Morris


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
[EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Images donot appear

2001-04-08 Thread Sharmad Naik

Although i have compiled php with gd i don't get image do i have to make 
any changes in php.ini

-Regards  
-- 
The secret of the universe is @*!'^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-08 Thread The Hermit Hacker

On Sun, 8 Apr 2001, Bob Hall wrote:

 Doug,

 You've posted your usual good sense, combined with one statement I
 strongly disagree with.

 One of
 these products is a relational database management system.  The other is a
 quasi-SQL-like-front-end-to-systems-of-indexed-files that has never
 concerned itself with things like standards conformance.

 The implication is that MySQL is not an RDBMS. The only attempt I
 know of to define an RDBMS was Codd's, and no DBMS has ever met the
 criteria he published in a paper in the late 80s (1986?). Even though
 Oracle doesn't meet the criteria of the best known definition (only
 definition?) of an RDBMS, we all seem to agree that Oracle is an
 RDBMS. An RDBMS is a DBMS designed to manage a relational database,
 and a database is relational because it stores data in linked,
 normalized tables.

The only thing I question in this is that without transaction support,
what exactly is MySQL "managing"?  MySQL is providing an SQL frontend to a
bunch of tables and indices, that is it ... it is up to the programmer to
handle the "managing of data" part where it revolves around being
relational ...

Also, note, that even today, MySQL does not handle transactions, Berkeley
DB does, and its purely optional, and per table.  So, effectively, it has
"transactional tables", its not a "transactional system" ... if you didn't
define a table for transactions when you created it, you just created your
weak link ... again, its not MySQL that manages the system, its the
programmer who has to do it ... *shrug*



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] mysql -- php

2001-04-08 Thread Adam

Hello,
I have a fresh instalation of mysql from the ditribution of RH7.
What do I have to put into the user and host tables so that
I can use MySQL through PHP (I doesn't have to be super-secure,
just so that not everybody could get to my databases)

Btw.
Now I get this error when trying to use mysql in a php script:
Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in lib.inc.php3 on line 97
 Error
I'm sure that mysql server is running.

Greets,
Adam



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] PHP MySql

2001-04-08 Thread Jonathan Underfoot

I'm getting an Invalid Query error after inputting the following

connect to Server
select DB

$sql_query = "UPDATE commentary SET com_num=$com_num, com_by=$com_by,
com_band=$com_band, com_title=$com_title, com_release=$com_release,
com_rating=$com_rating, com_body=$com_body, com_type=$com_type, WHERE
com_num=$com_num";
$result = mysql_query ($sql_query)
or die ("Invalid query / error");

This is all directly from a form. The variables are all valid.  I've tried
making the query something like
"UPDATE commentary SET com_release=test WHERE com_num=8" and even that
dosen't work.

Ideas?

Thanx,

-Jonathan Underfoot


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mysql -- php

2001-04-08 Thread B. van Ouwerkerk

At 21:20 8-4-01 +0200, Adam wrote:
Hello,
I have a fresh instalation of mysql from the ditribution of RH7.
What do I have to put into the user and host tables so that
I can use MySQL through PHP (I doesn't have to be super-secure,
just so that not everybody could get to my databases)

I don't claim a very good long or short term memory.. but this is the 
second time I see this question..

Keep a question in the proper location two seperate threads is a bad 
idea. People on the installphp list don't know if you already received an 
answer.. The same goes for the PHP DB list..

Bye,


B.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] MS SQL server 2k and php4 on win32

2001-04-08 Thread alarion

Well, I just started working on implementing SQL Server support in my
database abstraction class. I downloaded and installed the SQL2k evaluation
from MS and I can connect through DBArtisan and through the SQL Server Query
tool. However when I try to do it through PHP, it just sits there, and
causes IIS to get b0rked. the mssql7 dll is enabled, maybe that's the
problem?

Maybe it's a path order problem? I moved the SQL Server "binn" path to the
front of my path statement, but no change.

Any ideas?

(yes, I searched the archive first, but didn't find anything helpfull =/)

-
Sean Finkel
Webmaster - Rabid Wolf .:: Hungry For Knowledge ::.
http://www.rabid-wolf.com
-


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP-DB] Display data begin with A

2001-04-08 Thread Victor Foitzik

Hi,

if you're using MySQL, the simpliest method is using RLIKE

SELECT stuff FROM table WHERE stuff RLIKE '^[0-9]+';

see
http://www.mysql.com/doc/S/t/String_comparison_functions.html
http://www.mysql.com/doc/R/e/Regexp.html
for more info

HTH
Victor

 Okay it's working now..
 How if I want to display all the data begin with NUMBERS. like "1,2,3,...,0"



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] PHP-MySQL - Escaping single quotes

2001-04-08 Thread duncan

I've been surprised that I couldn't find a quick answer to this in the books
and resources I've looked at. It must be really straightforward but how are
single quotes (apostrophes) in record data (such as a name like O'Reilly)
handled on data entry? Presumably they are escaped in the database and then
"unescaped" when they are retrieved? How? Is their a function like
htmlspecialchars() or addslashes()?

What other characters need to be escaped when receiving data through PHP
into a MySQL database?

Thanks

Duncan.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]