[PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread G E Holt
I hope this is something easy I am overlooking but here goes: I have a table called: country which has the following fields: FieldType ip_from double(11,0) ip_todouble(11,0) country_code char(2) country_name varchar(50) IP_FROM

Re: [PHP-DB] How can I get the number of entries retrieved by aSELECT - FROM

2003-06-13 Thread Ronan Chilvers
On 12 Jun,2003 at 18:21 Becoming Digital wrote: snip The PHP SELECT FROM below (before snip) listed the expected data. Is there a way to get the digit 3 into a PHP variable $data = mysql_result($result,1,name)); How do I trap or collect or save the digit 3 generated the mysql SELECT

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Ronan Chilvers
On 13 Jun,2003 at 0:48 G E Holt wrote: $resolved=$DB_site-query_first(SELECT * FROM country WHERE '$resolvingip' BETWEEN ip_from AND ip_to); Don't think you should have the '' around the ip number. Does that help? Ronan e: [EMAIL PROTECTED] t: 01903 739 997 w: www.thelittledot.com The

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Jason Wong
On Friday 13 June 2003 15:48, G E Holt wrote: I hope this is something easy I am overlooking but here goes: I have a table called: country which has the following fields: FieldType ip_from double(11,0) ip_todouble(11,0) country_code

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Ronan Chilvers
Here's how I did it when playing with this... Table definition:- CREATE TABLE ip_list ( ip_from double default NULL, ip_to double default NULL, country_code char(2) default NULL, country_name varchar(100) default NULL, KEY ip_from (ip_from,ip_to,country_code,country_name) )

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Doug Thompson
Why not use the built-in conversion functions in mysql? From the manual: quote INET_NTOA(expr) Given a numeric network address (4 or 8 byte), returns the dotted-quad representation of the address as a string: mysql SELECT INET_NTOA(3520061480); - 209.207.224.40 INET_ATON(expr) Given

Re: [PHP-DB] Re: MySQL, PHP, and XML

2003-06-13 Thread Manuel Lemos
Hello, On 06/12/2003 10:21 AM, Hardik Doshi wrote: Hi Manuel, Do you have any references for generating XML files from any of the persistent database? That depends on what you want to do. This class can generate arbitrary XML documents: http://www.phpclasses.org/xmlwriter This package can

[PHP-DB] Time input formatting in PHP-12 hour clock

2003-06-13 Thread David Shugarts
Hi, All-- Has anyone already solved the problem of how to get a time input from the user in people time (12-hour clock) and format it to be INSERTed in a mySQL time field? The mySQL time field is 24-hour and of course it can be formatted in the SELECT statement to be displayed as 12-hour for the

Re: [PHP-DB] Time input formatting in PHP-12 hour clock

2003-06-13 Thread Ronan Chilvers
Hi David Comments inline... On 13 Jun,2003 at 10:26 David Shugarts wrote: snip PHP--I need the user to be able to input a time, then validate it as to whether it is complete (e.g., expresses AM or PM and evaluates correctly), then pass it into an INSERT statement into the time field of a

RE: [PHP-DB] Time input formatting in PHP-12 hour clock

2003-06-13 Thread Carl Furst
There are several ways you can do it. But the first step is to translate to 24 hour time. So the first thing we have to check is if the am or pm flag was set. Then add 12 hours or leave as is OR set the hour to 00 (midnight). Something like this may help: Switch(strtoupper($ampm_flag)) { // if

[PHP-DB] Keeping entries of a select-box after submitting the form

2003-06-13 Thread André Sannerholt
Hi everyone, Well, I have already formulated my problem several times, always in a different way, but yet I have no solution. I try to say it as easy as it gets: I simply want one specific selction-box to 'keep' ALL options present after having submited the form! I'm thinking about a variable

Re: [PHP-DB] Keeping entries of a select-box after submitting the form

2003-06-13 Thread Ignatius Reilly
What you can do is replicate all OPTIONs with hidden fields: SELECT name=myselect[] OPTION value=1Al di Meola/OPTION OPTION value=2John McLaughlin/OPTION ... /SELECT INPUT name=replica[1] type=hidden value=Al di Meola / INPUT name=replica[2] type=hidden value=John McLaughlin / ... But I fail to

[PHP-DB] Re: Problem with 4.3.2

2003-06-13 Thread Jacob Marble
Interesting. They say the ISAPI module isn't production quality yet... we use it, though, w/o problems. We're running IIS on Win2000 and php 4.3.2. Does it work besides the phpinfo() problem? Jake LandEZ Ryan Jameson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] More info... I

[PHP-DB] addslashes, stripslashes, htmlspecialchars

2003-06-13 Thread Steve B.
Hi this is about PHP commands even though has mysql too. I go to mysql board when I find one they said MySQL is not necessarily PHP driven and if I want PHP specific questions to go to a PHP list. How do you deal with forms, db storage of the data and calling it up in a form to edit? The

[PHP-DB] Strange phpmyadmin 2.2.3 bug?

2003-06-13 Thread Chris Payne
Hi there everyone, I'm trying to insert the below text into phpmyadmin, and it inserts fine, but when I try to access it via PHP it doesn't access it, and via phpmyadmin 2.2.3 I can't delete it OR edit it, so is there any illegal character in the below text that you can see? I put it into a

Re: [PHP-DB] addslashes, stripslashes, htmlspecialchars

2003-06-13 Thread Becoming Digital
The functions you're wondering about are designed for dealing with inserting user input into a database. If you have a form in which someone can enter text, you need to process the input with addslashes() in case the user input contains quotes. htmlspecialchars() and htmlentities() have similar

[PHP-DB] PHP transfer variable question?????

2003-06-13 Thread linton
PHP transfer variable question? My program is ok in apache_1.3.19 and php-4.1.2£¬but when I change over to php_4.3.2 and apache_1.3.27,I can't get variable¡£ code: //newsList.php: $querystring = SELECT id,title FROM