[PHP-DB] Re: Get ID of ROW when using aggregate functions

2009-04-10 Thread Neil Smith [MVP, Digital media]
At 03:00 09/04/2009, you wrote: Message-ID: c8.a5.28416.3666c...@pb1.pair.com To: php-db@lists.php.net Reply-To: Ondrej Kulaty kopyto...@gmail.com From: Ondrej Kulaty kopyto...@gmail.com Date: Wed, 8 Apr 2009 10:54:55 +0200 Subject: Get ID of ROW when using aggregate functions INSERT INTO

[PHP-DB] Re: Subject: php date/time zone

2009-03-19 Thread Neil Smith [MVP, Digital media]
At 04:57 19/03/2009, you wrote: Message-ID: 49c1d0c8.30...@silverbackasp.com Date: Thu, 19 Mar 2009 12:57:44 +0800 From: Ron r...@silverbackasp.com Subject: php date/time zone Hi All, I have a form where in a user will enter a time and choose a timezone. based on those, i need to insert to db

[PHP-DB] Re : Problem with PDO exceptions

2009-03-08 Thread Neil Smith [MVP, Digital media]
Message-ID: 49b2ce8f.1090...@theingots.org Date: Sat, 07 Mar 2009 20:44:15 +0100 From: Daniel Carrera daniel.carr...@theingots.org Hello, I have MySQL 5.1 and PHP 5.2. For some reason PDO is not throwing exceptions when I give it a broken SQL query. For example: try { $stmt =

[PHP-DB] Re: Subject: PDO buffered query problem

2009-02-24 Thread Neil Smith [MVP, Digital media]
At 13:40 24/02/2009, you wrote: Message-ID: c4.82.23283.768e2...@pb1.pair.com To: php-db@lists.php.net,php-gene...@lists.php.net Date: Mon, 23 Feb 2009 18:16:01 + From: Stewart Duncan do...@gmx.net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed

[PHP-DB] Re: New Table Creation with PHP Variables

2008-12-30 Thread Neil Smith [MVP, Digital media]
At 12:43 29/12/2008, you wrote: Message-ID: 008b1179ce594ebea03cb06480182...@dragon From: Keith Spiller larent...@hosthive.com To: php_db php-db@lists.php.net Date: Sun, 28 Dec 2008 17:39:08 -0700 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=iso-8859-1;

Re: Re: [PHP-DB] Building WHERE SQL clauses

2008-09-16 Thread Neil Smith [MVP, Digital media]
At 03:46 16/09/2008, you wrote: Message-ID: [EMAIL PROTECTED] Date: Mon, 15 Sep 2008 18:33:04 +0100 From: Stephen Wellington [EMAIL PROTECTED] To: Mike Sullivan [EMAIL PROTECTED], php-db@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit

[PHP-DB] Re: Sqlite 3 pdo update query problem

2008-08-20 Thread Neil Smith [MVP, Digital media]
At 09:15 20/08/2008, you wrote: Message-Id: [EMAIL PROTECTED] From: Amy Gibbs [EMAIL PROTECTED] Date: Wed, 20 Aug 2008 09:08:42 +0100 I've managed to connect to my database, and run a select query, but now I need to run an UPDATE query and it just doesn't seem to take effect. Things I'd try

[PHP-DB] Re: Query Across DBMS Boundaries (Linked Database Servers?)

2008-03-21 Thread Neil Smith [MVP, Digital media]
At 14:12 21/03/2008, you wrote: Message-ID: [EMAIL PROTECTED] Date: Thu, 20 Mar 2008 11:05:22 -0500 From: Dee Ayy [EMAIL PROTECTED] To: php-db@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Query Across DBMS Boundaries

[PHP-DB] RE: ordering date in varchar

2008-03-13 Thread Neil Smith [MVP, Digital media]
Message-ID: [EMAIL PROTECTED] Date: Thu, 13 Mar 2008 14:05:39 +0530 From: Vaibhav Informatics [EMAIL PROTECTED] We have a problem. We have given the dates as date.month.year eg 27.12.2007 The field is named as varchar. We have to arrange ths list of dates in ascending order. Can anyone help?

[PHP-DB] Re:Multiple values in SELECT query

2008-03-10 Thread Neil Smith [MVP, Digital media]
At 19:34 09/03/2008, you wrote: From: Ron Piggott [EMAIL PROTECTED] Date: Sun, 09 Mar 2008 15:34:05 -0400 Message-Id: [EMAIL PROTECTED] What is the correct syntax for where the results may be 1 or 2? What have I done wrong? SELECT * FROM table WHERE name LIKE ABC AND listing_type = 1 or 2

[PHP-DB] Re: Subject: Ordering a varchar field in mysql

2007-12-04 Thread Neil Smith [MVP, Digital media]
At 09:44 04/12/2007, you wrote: Message-ID: [EMAIL PROTECTED] Date: Tue, 4 Dec 2007 11:12:40 +0530 From: Vaibhav Informatics [EMAIL PROTECTED] *Questions on PHP* On PHP, OK sure In one of our tables, one of the field is acc_no, we had given the data type as varchar, since it could take

[PHP-DB] Re: Subject: Accessing last inserted record in a PSQL Database table

2007-11-27 Thread Neil Smith [MVP, Digital media]
At 23:50 26/11/2007, you wrote: Date: Mon, 26 Nov 2007 18:19:07 -0600 Reply-to: [EMAIL PROTECTED] [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] I need to access the last inserted record in a postgresql database table from php. I connect to the db using pg_connect I construct the query string,

Re: [PHP-DB] Re: backup of database record before update

2007-11-01 Thread Neil Smith [MVP, Digital media]
At 09:46 01/11/2007, you wrote: Message-ID: [EMAIL PROTECTED] Date: Thu, 1 Nov 2007 10:45:57 +0100 Leo G. Divinagracia III wrote: Stephen Sunderlin wrote: Neil, Have you had success with triggers. I couldn't get one to work and then saw discussion ... ...snip... ... on a 5.0.20nt box.

[PHP-DB] Re: Dealing with Namespace/Colon in SimpleXML

2007-10-30 Thread Neil Smith [MVP, Digital media]
At 06:57 28/10/2007, you wrote: Message-ID: [EMAIL PROTECTED] From: Andrew Darby [EMAIL PROTECTED] Hello, all. I'm trying to use SimpleXML to loop through an .xml file, but when I try to do the following, it chokes on the colon: foreach ($xml_data-dc:title as $item) { [do whatever here] }

[PHP-DB] Re: backup of database record before update

2007-10-30 Thread Neil Smith [MVP, Digital media]
At 06:57 28/10/2007, you wrote: Message-ID: [EMAIL PROTECTED] Date: Sun, 28 Oct 2007 14:56:12 +0800 From: Ronald Wiplinger [EMAIL PROTECTED] I need some hints how to do that. Maybe there is a template or an easy function available. I have a MySQL database with some tables. Everytime a table

[PHP-DB] Re: Subject: union/select statement number of columns

2007-10-21 Thread Neil Smith [MVP, Digital media]
At 19:31 19/10/2007, you wrote: Message-ID: [EMAIL PROTECTED] Date: Fri, 19 Oct 2007 09:24:38 -0600 Subject: union/select statement number of columns Hello all, I receive an error of the following: The used SELECT statements have a different number of columns. Any help, pointers, tutorials are

[PHP-DB] [Correction] Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding

2007-07-24 Thread Neil Smith [MVP, Digital media]
The solution is pretty simple once you hit it, and works in both MySQL and PGSQL because it's standard SQL-92 : $query=SET NAMES 'UTF-8'; Sorry - I meant $query=SET NAMES 'UTF8'; As you pointed out, it's UTF8 not UTF-8 ;-) Cheers - Neil -- PHP Database Mailing List (http://www.php.net/)

[PHP-DB] Subject: sql statement - complex order by

2007-07-04 Thread Neil Smith [MVP, Digital media]
At 20:36 02/07/2007, you wrote: Message-ID: [EMAIL PROTECTED] To: php-db@lists.php.net Date: Mon, 02 Jul 2007 14:34:35 -0500 From: Bryan [EMAIL PROTECTED] SELECT * FROM productgroup WHERE groupid = $productid AND label = 'Cats' ORDER BY title SELECT * FROM productgroup WHERE groupid =

[PHP-DB] Re: Subject: auto_increment

2007-04-15 Thread Neil Smith [MVP, Digital media]
At 03:04 14/04/2007, you wrote: From: Ron Piggott [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: PHP DB [EMAIL PROTECTED] Content-Type: multipart/alternative; boundary==-xK5L7HjLIUaeMS/bzYQr Date: Fri, 13 Apr 2007 22:03:59 -0400 Message-Id: [EMAIL PROTECTED] Mime-Version: 1.0 Subject:

[PHP-DB] Re: ORDERing two UNION queries

2007-04-14 Thread Neil Smith [MVP, Digital media]
At 03:04 14/04/2007, you wrote: Message-ID: [EMAIL PROTECTED] Date: Fri, 13 Apr 2007 17:48:11 +0100 From: ioannes [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] MIME-Version: 1.0 To: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit

[PHP-DB] Syntax Problem (Was : Date problem)

2007-01-21 Thread Neil Smith [MVP, Digital media]
At 16:26 21/01/2007, you wrote: I have a date field in mysql called event_end . I want to run a query to find all records where the event_and is greater than today's date. I have written the following code. It does not work. Please point out the mistake. $today = getdate(); $sql=select *

[PHP-DB] Re: user directory from a form

2006-10-01 Thread Neil Smith [MVP, Digital media]
Message-ID: [EMAIL PROTECTED] Date: Sun, 01 Oct 2006 17:45:03 +0200 From: Neil Jackson [EMAIL PROTECTED] MIME-Version: 1.0 To: php-db@lists.php.net Content-Type: multipart/mixed; boundary=000308070500010902000303 Subject: user directory from a form I apologise for using this

[PHP-DB] Re: Subject: making an array from data in textfile

2006-07-24 Thread Neil Smith [MVP, Digital media]
Message-ID: [EMAIL PROTECTED] Date: Sat, 22 Jul 2006 21:31:35 -0400 From: Dave W [EMAIL PROTECTED] To: Php-Db php-db@lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_Part_157142_2227727.1153618295222 Subject: making an array from data in textfile OK,

[PHP-DB] Re: Subject: Using MAX with COUNT?

2006-07-24 Thread Neil Smith [MVP, Digital media]
Message-ID: [EMAIL PROTECTED] Date: Sat, 22 Jul 2006 13:48:43 -0600 From: Skip Evans [EMAIL PROTECTED] MIME-Version: 1.0 To: Php-Db php-db@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Using MAX with COUNT? Hey all, I have a

[PHP-DB] Re: Subject: Parse Problem

2006-05-09 Thread Neil Smith [MVP, Digital media]
At 10:04 09/05/2006, you wrote: Message-ID: [EMAIL PROTECTED] From: Andy Rolls-Drew [EMAIL PROTECTED] To: php-db@lists.php.net Date: Tue, 9 May 2006 10:03:54 +0100 Message-ID: !~!UENERkVCMDkAAQACABgAGw7HZJPFmUmqr9/[EMAIL PROTECTED] MIME-Version: 1.0 Content-Type:

Re: [PHP-DB] Query select value on MAX Date

2006-02-25 Thread Neil Smith [MVP, Digital media]
At 08:47 25/02/2006, you wrote: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=_=_NextPart_001_01C63997.1A6B1B7D Date: Sat, 25 Feb 2006 08:07:36 +0900 Message-ID: [EMAIL PROTECTED] From: [EMAIL PROTECTED] To: 'php-db@lists.php.net' Subject: FW: [PHP-DB] Query select

[PHP-DB] Re: Sessions help needed !!!

2006-02-18 Thread Neil Smith [MVP, Digital media]
At 22:19 17/02/2006, you wrote: From: Chris Payne [EMAIL PROTECTED] To: php-db@lists.php.net Date: Fri, 17 Feb 2006 17:18:57 -0500 Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000_000F_01C633E6.3C6626A0 Subject: Sessions

[PHP-DB] Re: Subject: screen resolution!

2006-02-05 Thread Neil Smith [MVP, Digital media]
At 08:41 05/02/2006, you wrote: Message-ID: [EMAIL PROTECTED] Date: Sun, 5 Feb 2006 02:44:19 +1100 (EST) From: JeRRy [EMAIL PROTECTED] To: php-db@lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0-733704850-1139067859=:48594 Content-Transfer-Encoding: 8bit Subject:

[PHP-DB] Freelancers, UK ?

2006-01-30 Thread Neil Smith [MVP, Digital media]
Any UK based freelancers out there ? A contact at our sister company EPC Direct in Bristol is looking for somebody to tackle a couple of ECom sites. Need advanced PHP/MySQL, also expected skills in XML and XSLT - I don't have full details here of the brief. Duration likely to be one month

RE: [PHP-DB] Storing Credit Cards, Passwords, Securely, two-way encryption

2006-01-09 Thread Neil Smith [MVP, Digital media]
From: Dwight Altman [EMAIL PROTECTED] To: 'Peter Beckman' [EMAIL PROTECTED], 'Neil Smith [MVP, Digital media]' [EMAIL PROTECTED] Cc: php-db@lists.php.net Date: Mon, 9 Jan 2006 09:24:05 -0600 Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=us

Re: [PHP-DB] Storing Credit Cards, Passwords, Securely, two-way encryption

2006-01-06 Thread Neil Smith [MVP, Digital media]
At 03:48 06/01/2006, you wrote: Date: Thu, 5 Jan 2006 22:48:24 -0500 (EST) From: Peter Beckman [EMAIL PROTECTED] To: John Meyer [EMAIL PROTECTED] cc: php-db@lists.php.net Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re:

[PHP-DB] Re: Cannot connect to a MySQL DB using a Class

2006-01-05 Thread Neil Smith [MVP, Digital media]
At 00:46 05/01/2006, you wrote: Message-ID: [EMAIL PROTECTED] To: php-db@lists.php.net Date: Wed, 04 Jan 2006 16:45:54 -0800 From: Todd Cary [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: CAnnot connect to

[PHP-DB] Re: Subject: Scrolling News

2005-12-23 Thread Neil Smith [MVP, Digital media]
At 20:39 22/12/2005, you wrote: Date: Thu, 22 Dec 2005 20:38:58 + From: Alex Major [EMAIL PROTECTED] To: php-db@lists.php.net Message-ID: [EMAIL PROTECTED] Mime-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit Subject: Scrolling News Hi there.

[PHP-DB] Re : Subject: using fsockopen to handle redirections

2005-12-23 Thread Neil Smith [MVP, Digital media]
Date: Fri, 23 Dec 2005 10:04:16 + From: Yemi Obembe [EMAIL PROTECTED] To: php-db@lists.php.net Subject: using fsockopen to handle redirections Any way i can use fsockopen to detect url redirections? for example if ds: www.ex1.com redirects to www.ex2.com and i'm using: $fp =

[PHP-DB] Re: CLOSE button or a href link

2005-12-22 Thread Neil Smith [MVP, Digital media]
At 07:18 22/12/2005, you wrote: From: Ron Piggott (PHP) [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: PHP DB php-db@lists.php.net Content-Type: text/plain Date: Thu, 22 Dec 2005 02:22:00 -0500 Message-Id: [EMAIL PROTECTED] Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: CLOSE

[PHP-DB] Re: Date Formatting Question

2005-12-14 Thread Neil Smith [MVP, Digital media]
Apart from anything, you need to supply an option value for each of those options, not just rely on the browser which will default to passing the option *text* back from the form, if you specify no value. So your option elements should read option value=1January/option Notwithstanding that,

[PHP-DB] Subject: GROUP BY [Was: SELECT]

2005-12-11 Thread Neil Smith [MVP, Digital media]
From: Ron Piggott (PHP) [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: PHP DB php-db@lists.php.net Content-Type: text/plain Date: Sat, 10 Dec 2005 20:04:28 -0500 Message-Id: [EMAIL PROTECTED] Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: SELECT I am trying to put together a

[PHP-DB] Re: Subject: Login Auth help?

2005-11-11 Thread Neil Smith [MVP, Digital media]
NO ! The headers have to be sent *after* you check the values of $_SERVER[PHP_AUTH_USER] , which you changed inexplicably to $PHP_AUTH_USER (which is no longer a global variable in recent versions of PHP 4.1). If they are not global variables within PHP then it'll treat them as local

[PHP-DB] Re:Login Auth help?

2005-11-10 Thread Neil Smith [MVP, Digital media]
At 15:21 10/11/2005, you wrote: Message-ID: [EMAIL PROTECTED] Date: Thu, 10 Nov 2005 11:24:09 +1100 (EST) From: JeRRy [EMAIL PROTECTED] To: php-db@lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0-1489996746-1131582249=:37621 Content-Transfer-Encoding: 8bit Subject:

[PHP-DB] Re: Subject: Specific order by MySQL statement

2005-11-08 Thread Neil Smith [MVP, Digital media]
At 09:37 08/11/2005, you wrote: Message-ID: [EMAIL PROTECTED] Date: Mon, 07 Nov 2005 11:47:32 + From: Adrian Bruce [EMAIL PROTECTED] MIME-Version: 1.0 To: php-db@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Specific order

[PHP-DB] Re: Complex Left Join

2005-10-31 Thread Neil Smith [MVP, Digital media]
At 20:28 31/10/2005, [EMAIL PROTECTED] wrote: Message-ID: [EMAIL PROTECTED] From: Keith Spiller [EMAIL PROTECTED] To: [PHP-DB] php-db@lists.php.net Date: Mon, 31 Oct 2005 13:29:18 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative;

[PHP-DB] Re: Subject: Searching remote web sites for content

2005-10-23 Thread Neil Smith [MVP, Digital media]
At 06:26 23/10/2005, you wrote: Message-ID: [EMAIL PROTECTED] Date: Sat, 22 Oct 2005 13:21:26 -0400 From: Joseph Crawford [EMAIL PROTECTED] To: [PHP-DB] Mailing List php-db@lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative;

[PHP-DB] Re: Subject: Searching remote web sites for content

2005-10-22 Thread Neil Smith [MVP, Digital media]
At 16:17 22/10/2005, you wrote: Message-ID: [EMAIL PROTECTED] From: ioannes [EMAIL PROTECTED] To: php-db@lists.php.net Date: Sat, 22 Oct 2005 16:17:22 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=iso-8859-1; reply-type=original

[PHP-DB] RE : Subject: com and retrieve text from word

2005-08-31 Thread Neil Smith [MVP, Digital media]
Message-ID: [EMAIL PROTECTED] Date: Wed, 31 Aug 2005 12:54:42 +0900 From: Yui Hiroaki [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] MIME-Version: 1.0 To: php-db@lists.php.net Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Subject: com and retrieve text from word

RE: [PHP-DB] Re: HTML layout and arrays (WAS : Brain not working, helpneeded :-). .

2005-08-29 Thread Neil Smith [MVP, Digital media]
- From: Neil Smith [MVP, Digital media] [mailto:[EMAIL PROTECTED] The variable type you need is called an array, it has numerical indexes : In PHP you can just omit the index and it'll be automatically auto-incremented from zero, so there's no need to maintain a counter : $videos=array(); while ($row

[PHP-DB] RE : HTML Layout (WAS : DB formatting question)

2005-08-27 Thread Neil Smith [MVP, Digital media]
Message-Id: [EMAIL PROTECTED] From: Chris Payne [EMAIL PROTECTED] To: php-db@lists.php.net Date: Sat, 27 Aug 2005 02:31:13 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000__01C5AAAF.64FE18E0 Subject: DB formatting question Hi there everyone,

[PHP-DB] Re : Subject: floats

2005-07-20 Thread Neil Smith [MVP, Digital media]
Message-ID: [EMAIL PROTECTED] Date: Tue, 19 Jul 2005 15:16:47 -0400 From: blackwater dev [EMAIL PROTECTED] Reply-To: blackwater dev [EMAIL PROTECTED] To: php-db@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Subject: floats I am running a query on MySQL: select *

[PHP-DB] Subject: RE: [FIX YOUR SUBJECT !] php-db Digest 20 Jun 2005 23:54:37 -0000 Issue 2992

2005-06-22 Thread Neil Smith [MVP, Digital media]
Hi - Suggestions : 1) Turn on error_reporting in your PHP script : ?php error_reporting(E_ALL); ? 2) Load page, and go to browser's View-Source menu, to see if you actually got malformed HTML or anything at all. Cheers - Neil From: Cosman CUSCHIERI [EMAIL PROTECTED] To:

[PHP-DB] RE : Subject: Com 1

2005-06-14 Thread Neil Smith [MVP, Digital media]
From: Nandar [EMAIL PROTECTED] To: php-db@lists.php.net Message-ID: [EMAIL PROTECTED] Date: Tue, 14 Jun 2005 10:01:59 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000_0007_01C570C8.1A876C60 Subject: Com 1 Hi,. any one to know, how to send ascci

[PHP-DB] Re: Subject: Creating an Associative Array

2005-06-08 Thread Neil Smith [MVP, Digital media]
At 21:04 08/06/2005 +, you wrote: To: php-db@lists.php.net MIME-Version: 1.0 Message-ID: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Date: Wed, 8 Jun 2005 16:04:33 -0500 Content-Type: multipart/alternative; boundary==_alternative 0073C60C8625701A_= Subject: Creating an Associative Array

[PHP-DB] Re: Subject: How many rows for 100 questions?

2005-05-30 Thread Neil Smith [MVP, Digital media]
At 04:51 29/05/2005 +, you wrote: Message-ID: [EMAIL PROTECTED] To: php-db@lists.php.net From: ...helmut [EMAIL PROTECTED] Date: Sat, 28 May 2005 12:19:02 -0500 Subject: How many rows for 100 questions? I have a questionary that has 100 questions, Should I create 2 tables 1 with the user

[PHP-DB] Re: Subject: how do i fetch some text

2005-05-30 Thread Neil Smith [MVP, Digital media]
At 04:51 29/05/2005 +, you wrote: Message-ID: [EMAIL PROTECTED] To: php-db@lists.php.net Date: Sun, 29 May 2005 09:54:50 +0530 From: chintan [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: how do i fetch

[PHP-DB] RE: Subject: Form information

2005-05-26 Thread Neil Smith [MVP, Digital media]
Message-Id: [EMAIL PROTECTED] From: Chris Payne [EMAIL PROTECTED] To: php-db@lists.php.net Date: Wed, 25 May 2005 00:53:59 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000__01C560C4.3CC5A710 Subject: Form information Hi there everyone, I'm

[PHP-DB] RE : Subject: Letters loop

2005-05-26 Thread Neil Smith [MVP, Digital media]
for ($i=1; $i=26; $i++) { print(chr(64+$i)); } chr() prints the ASCII character corresponding to that number. Upper case A-Z starts at 64 : http://www.lookuptables.com Cheers - Neil Date: Wed, 25 May 2005 20:37:47 -0700 From: MIGUEL ANTONIO GUIRAO AGUILAR [EMAIL PROTECTED] To:

[PHP-DB] Re : How to I get to a next entry

2005-05-20 Thread Neil Smith [MVP, Digital media]
At 22:28 19/05/2005 +, you wrote: Message-Id: [EMAIL PROTECTED] From: John R. Sims, Jr. [EMAIL PROTECTED] To: php-db@lists.php.net, php_mysql@yahoogroups.com Date: Thu, 19 May 2005 12:20:24 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative;

[PHP-DB] Fwd: Subject: URL question

2005-04-30 Thread Neil Smith [MVP, Digital media]
Easy enough, using Mod Rewrite on apache (you didn't say which server you use, so I'm afraid you'll have to upgrade if using IIS) : Create a file in a text editor. Save it as .htaccess (dot-htaccess as the filename) in the http://www.blablah.com/examples/ directory - not in the root folder or

[PHP-DB] Subject: Help wanted, Writing to the LPT Port.

2005-04-22 Thread Neil Smith [MVP, Digital media]
Actually, php-db is a list for (wait for it!) PHP used with DB (databases) so you've got the wrong list, you meant to send it to PHP-general. Anyway to answer your question, you can send an 8 bit printer port a series of ASCII characters (0-255) which correspond to your values, so say chr(35)

[PHP-DB] Subject: Web Printing

2005-04-01 Thread Neil Smith [MVP, Digital media]
At 10:27 31/03/2005 +, you wrote: Message-ID: [EMAIL PROTECTED] From: Ng Hwee Hwee [EMAIL PROTECTED] To: PHP DB List php-db@lists.php.net Date: Thu, 31 Mar 2005 18:24:41 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000_00CD_01C5361E.E80297D0

Re: [PHP-DB] Forms...

2005-03-10 Thread Neil Smith [MVP, Digital media]
At 07:52 10/03/2005 +, you wrote: Message-ID: [EMAIL PROTECTED] Date: Wed, 09 Mar 2005 20:37:36 +0100 From: Jochem Maas [EMAIL PROTECTED] if your into XHTML: input name=right_eye type=checkbox value=1 checked=checked value=1 / Actually that's invalid XHTML (it won't validate) due to a typo I

Re: [PHP-DB] Re:data grabbing and mathematics!

2005-03-08 Thread Neil Smith [MVP, Digital media]
At 09:48 08/03/2005 +, you wrote: Message-ID: [EMAIL PROTECTED] Date: Mon, 07 Mar 2005 13:01:45 -0600 From: Martin Norland [EMAIL PROTECTED] Reply-To: php-db@lists.php.net MIME-Version: 1.0 To: php-db@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed

[PHP-DB] Subject: mysql_real_escape_string for HTML p???

2005-03-06 Thread Neil Smith [MVP, Digital media]
You actually need (it's in the manual) nl2br for this. It converts newline (nl) to (2) break (br) so this text (\n indicates a newline character or 'enter' as you've called it) This\n is\n a\n test\n Would become Thisbr /\n isbr /\n abr /\n testbr /\n Make sure you strip those br / if you intend

Re: [PHP-DB] timestamp

2005-01-29 Thread Neil Smith [MVP, Digital media]
Balwant - according to http://php.planetmirror.com/manual/en/ref.datetime.php shouldn't you be using http://php.planetmirror.com/manual/en/ref.datetime.phpfunction.strtotime.phpstrtotime rather than strftime for this ? strftime needs input of a timestamp a large Int32 Unix Timestamp), where

RE: [PHP-DB] Re: Subject: mysql - image storing

2005-01-19 Thread Neil Smith [MVP, Digital media]
At 09:48 19/01/2005 +, mel list_php wrote: Ok Neil, I'll try this as well.I thought a readfile would be also forbidden by the htaccess, No, .htaccess affects public viewing of the web root and child folders. PHP operates on the web server's file system (in as far as your host/ISP permits

[PHP-DB] Re: Subject: mysql - image storing

2005-01-18 Thread Neil Smith [MVP, Digital media]
No, really really , don't do this. Store the path to the image. You then load the path into PHP and use header(Content-type: image/jpeg); readfile($path_from_database); exit; Then .htaccess the *actual directory* you store the images in so it's hidden from browsing. Only allow authorised people

[PHP-DB] RE: How to process a query form with CHECKBOX RADIO not checkbox !

2004-12-28 Thread Neil Smith [MVP, Digital media]
At 01:23 28/12/2004 +, you wrote: Date: Mon, 27 Dec 2004 17:22:49 -0800 (PST) From: S Kumar [EMAIL PROTECTED] To: php-db@lists.php.net, php-general@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: How to process a query form with CHECKBOX Please help DIVAge

[PHP-DB] Re: Subject: [PHP-DB] KEYBOARD

2004-12-01 Thread Neil Smith [MVP, Digital media]
It's all client-side Javascript. I'll send you by email (off-list) an example I wrote this week for touchscreen number data entry so you can see how to do it. Then you're on your own ! This is *not* a PHP *or* a DB question, please keep general web-development questions to a more appropriate

[PHP-DB] RE : Subject: Excel - merging cells with PHP

2004-11-30 Thread Neil Smith [MVP, Digital media]
Sure, you'd output to the Excel XML spreadsheet format, which allows you to do colspans and such, although with a different syntax to HTML. (I posted this answer to the microsoft.public.xsl list the other day ;-) The documentation is here :

[PHP-DB] Re: Subject: Javascript Question (Was PHP / Javascript question)

2004-11-16 Thread Neil Smith [MVP, Digital media]
Yes it can be a bit tricky first time. You'll be using numeric indexes (it's the easiest) so probably like this : Iterate through the form's elements array, check if each one is a [checkbox / radio / other] and then check the name for the element against a regex. If it matches then you need to

[PHP-DB] Re: Subject: Javascript Question (Was PHP / Javascript question)

2004-11-16 Thread Neil Smith [MVP, Digital media]
That if (df[i].checked=true) { should of course read if (df[i].checked==true) { sigh ! Cheers - Neil script language=javascript1.2 type=text/javascript function validate_form() { valid=true; df=document.forms[myform]; var regex=del\[\d+\]; for (i=0; idf.elements.length) {

[PHP-DB] Re: MySQL Data Not Returned

2004-11-13 Thread Neil Smith [MVP, Digital media]
My guess (and it will be correct) is that you've got a not visible character on the end of your email address in the database. Such a character could be a space, newline, tab or other similar character. Make sure you use trim($email_address) to create the field to insert into the database !

[PHP-DB] Re: php-db Digest 13 Nov 2004 11:54:41 -0000 Issue 2681

2004-11-13 Thread Neil Smith [MVP, Digital media]
Brilliant, nice one. You've just given me the opportunity to run my counter-spam signup script. I wa swaiting for a good opportunity like this, as it's a little difficult to test on myself !You have now been automatically subscribed to 14,500 newsletter distribution lists and opt-out mailings.

[PHP-DB] Re:Subject: Finding the highest number in a column?

2004-10-28 Thread Neil Smith [MVP, Digital media]
Surely some monday morning light headedness Chris ! SELECT MAX(column_name) AS max_number FROM table Make sure the column's indexed if you do it often ! Cheers - Neil At 03:32 28/10/2004 +, you wrote: Message-Id: [EMAIL PROTECTED] From: Chris Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date:

[PHP-DB] Re: Subject: Form Processing

2004-10-16 Thread Neil Smith [MVP, Digital media]
Sure you can Ron : Just give each submit button the same name, but a different ID in the html eg submit name=submit id=delete value=Delete / submit name=submit id=update value=Update / submit name=submit id=manage value=Management / When the user presses one of the buttons, look into the $_POST

[PHP-DB] Re: Subject: Print

2004-09-09 Thread Neil Smith [MVP, Digital media]
This is NOT a PHP question, or even a Javascript question - it's basic HTML and CSS. You must read here http://www.dillonsoftware.com/essays/printing.jsp point #3 And here on A ListApart : http://www.alistapart.com/discuss/goingtoprint/6/ But please do not post basic HTML questions to the PHP

[PHP-DB] Re: php Form Validation help

2004-09-07 Thread Neil Smith [MVP, Digital media]
At 11:09 07/09/2004 +, you wrote: From: Vincent Jordan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Mon, 6 Sep 2004 19:20:16 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000_0004_01C49446.8C688C60 Subject: php Form Validation help have a form

Re: [PHP-DB] functions via event handlers

2004-09-07 Thread Neil Smith [MVP, Digital media]
Or you could use XMLHTTP on the browser side (supported by IE and Mozilla variants) You'd send a GET request to the page, it would return - often - an XML record set, or you can return text, and indeed you can even query page status codes from the client side. The point is, you no longer need

[PHP-DB] Re Displaying Text From A Data File

2004-09-04 Thread Neil Smith [MVP, Digital media]
It's actually very simple : Just use SELECT * FROM tbl_name ORDER BY RAND() LIMIT 1 Cheers - Neil At 17:35 04/09/2004 +, you wrote: Message-ID: [EMAIL PROTECTED] From: Ron Piggott [EMAIL PROTECTED] To: PHP DB [EMAIL PROTECTED] Date: Sat, 4 Sep 2004 14:00:56 -0400 MIME-Version: 1.0

[PHP-DB] Re: Subject: LOAD DATA LOCAL INFILE

2004-08-16 Thread Neil Smith [MVP, Digital media]
I often had trouble getting the syntaxt just right with PHP, it's easy to end up with the wrong number of slashes around the -lines terminated by '- parts of this. When you ran your query, what did mysql_error() say about it ? That would be a line you add directly after the line

[PHP-DB] Re: Subject: Enabling LDAP support

2004-08-03 Thread Neil Smith [MVP, Digital media]
I have copied the two required .dlls (libeay32 ssleay32) into the system folder. No, you need to copy the dll's to \winnt\system32, not \winnt\system thinking that that might make it work... but it didn't *How* didn't it work ? What did you try ? If it didn't connect, are you letting TCP port

[PHP-DB] RE: Subject OUTER JOIN ( WAS Subject: Multiple SELECT)

2004-07-12 Thread Neil Smith [MVP, Digital media]
This answer is quite involved, see below. Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 MIME-Version: 1.0 To: [EMAIL PROTECTED] Date: Sun, 11 Jul 2004 19:31:21 -0700 From: Marcjon [EMAIL PROTECTED] Message-Id: [EMAIL PROTECTED] I know this issue comes up alot, I've

[PHP-DB] RE : validate 2 password fields

2004-06-30 Thread Neil Smith [MVP, Digital media]
/SELECTbr input type=submit name=submit value='Add' input type=reset name=reset value='Reset' onClick=if (confirm('Warranty Database:\nAre you sure you want to reset the form\?')); /FORM - Original Message - From: Neil Smith [MVP, Digital media] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc

Re: [PHP-DB] Image Resize

2004-06-30 Thread Neil Smith [MVP, Digital media]
Kenny - you will find there are no native PHP handlers for TIFF. If you're on a unix system you'll be able to use the imagemagick function 'convert' at a command line to do this. Something like this I developed for a client will work, you'll need to look up the passthru function in the PHP

[PHP-DB] RE : validate 2 password fields

2004-06-29 Thread Neil Smith [MVP, Digital media]
Attach onsubmit=return checkpasswords() to your form tag. function checkpasswords() { df=document.forms[DisplayUser]; if (df[password1].value==df[password2].value) { // Passwords matched, clear password2, allow form to submit df[password2].value=;

[PHP-DB] Subject: Re: Javascript forms [2]

2004-06-29 Thread Neil Smith [MVP, Digital media]
At 22:20 28/06/2004 +, you wrote: From: Vincent Jordan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Sun, 27 Jun 2004 20:35:52 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Php form row delete problems I have tried

Re: [PHP-DB] Date help needed

2004-06-25 Thread Neil Smith [MVP, Digital media]
No, it's actually very easy to do the autocomplete once you get the hang of it. Actually the way I've done it is to populate a multi-select box but you could also use a DIV and write out the values Dump the email addresses as an XML file (generate this dynamically) then use XSLT to read out

[PHP-DB] Re: Subject: Retrieve data, add new fields and enter it in new ta

2004-06-22 Thread Neil Smith [MVP, Digital media]
Look at the INSERT... SELECT syntax in the MySQL manual Basically you can do this but only between 2 different tables (which is what you specified) : Generate and *test* the SELECT statement you want to use to recover your data set. Then in PHP try a query like this : $query=INSERT INTO table2

[PHP-DB] Re:Subject: big/small letters with oracle No2

2004-06-01 Thread Neil Smith [MVP, Digital media]
You can just use the PHP function ucwords(strtolower()) on the results as you loop through them to create the Select list ;-) So, this would convert NA to Na, and MG to Mg (as well as mG to Mg and MG to Mg ;-) Cheers - Neil At 10:41 01/06/2004 +, you wrote: Date: Tue, 01 Jun 2004 12:41:11

[PHP-DB] Re: Table Def error WAS Where Error

2004-05-29 Thread Neil Smith [MVP, Digital media]
It's probably a table definition thing. Is your 'netreceipts' column an ENUM ? How about your status column - is it a CHAR ? ENUM ? Send us the table definition for the misbehaving table. Also, send us the error message before asking what's the solution, we're not mind readers :-)) Your query

[PHP-DB] Re: Subject: SQL Statement

2004-05-19 Thread Neil Smith [MVP, Digital media]
You're missing a closing quote at the end of the line, following the group by `calls`, it should end as , `calls`; Since you are passing a string to PHP to hand off to the DB engine. Also, PHP function mysql_error($connection) is useful as this will return any errors generated by your database

[PHP-DB] Re: question on select

2004-05-13 Thread Neil Smith [MVP, Digital media]
** Or send XML files up and down dynamically using xmlhttp in IE and Mozilla ;-) Cheers - Neil At 04:06 13/05/2004 +, you wrote: To make a client-side solution possible, you'd have to send ALL POSSIBLE data to the page all at the same time then manipulate it with JavaScript. -- PHP Database

[PHP-DB] Re:RE: [PHP-DB] question on select

2004-05-13 Thread Neil Smith [MVP, Digital media]
That *should* read : document.fcountry.newcountry.value = document.fcountry.country[document.fcountry.country.selectedIndex].value; Skip the 'options' object - I'm surprised you're not getting a javascript error, maybe you have error reporting turned off in your browser ? In any case, always

Re: [PHP-DB] Edit with notepad

2004-05-11 Thread Neil Smith [MVP, Digital media]
Just offer them a link to the next page. Put amp;format=word in as the query string if they choose the 'view word document' link or no query string if they choose the plain text view as html page. Then go for if ($_GET[format]=='word') { header(Content-type: application/vnd-ms.word); }

[PHP-DB] RE :I thought 4 didn't equal 456456456%20%20OR%2012

2004-05-10 Thread Neil Smith [MVP, Digital media]
It doesn't. What you're seeing is an SQL injection attack. If you *trust* the SQL code you allow from POST or GET requests, your SQL server will be own3d in due course. That URL actually translates to 456456456 OR 12 Which is always true. So If you use this verbatim, you'll get a true result

[PHP-DB] Re: Subject: Edit with notepad

2004-05-10 Thread Neil Smith [MVP, Digital media]
Send before any content, an MS-Word header : header(Content-type: application/vnd-ms.word); Then output your HTML. Cheers - Neil. At 07:41 10/05/2004 +, you wrote: Message-ID: [EMAIL PROTECTED] From: Ng Hwee Hwee [EMAIL PROTECTED] To: DBList [EMAIL PROTECTED] Date: Mon, 10 May 2004 15:40:27

[PHP-DB] Subject: Struggling [Is : With database normalisation]

2004-05-05 Thread Neil Smith [MVP, Digital media]
Probably something as simple as changing the structure to a more normalised form would help : By adding a table which links evt_details to evt_sponsors, you do away with the need to have (up to 4) distinct fields to hold the evt_sponsor in your evt_details table. So add something like table :

[PHP-DB] Re: Subject: diference between == and ===

2004-05-03 Thread Neil Smith [MVP, Digital media]
The PHP manual (a useful read btw !) states that === tests for equality and *exact* equivalence, that is: If you test for ==='1' then $var must be a string for the result to be true if you test for ===1 then $var must be an integer or double type for the result to be true Usually its used in

[PHP-DB] Re: Subject: Image / file uploader

2004-04-30 Thread Neil Smith [MVP, Digital media]
BTW that line should read if ($dest =='') not if ($dest = '') You need 2 equals signs to test for equality, using one you are setting $dest to an empty string. It's a miracle it ever worked ;-) Cheers - Neil if ($dest = '') { if

Re: [PHP-DB] Page cannot be displayed problems

2004-04-29 Thread Neil Smith [MVP, Digital media]
PUT is still used with great success by systems such as WebDav. I'd stick to GET or POST though in a web environment, as the server needs to be specially configured to accept PUT requests and there are certain security implications from allowing people to upload files using PUT. Cheers - Neil.

[PHP-DB] Re: Subject: PHP vs. Flash

2004-04-16 Thread Neil Smith [MVP, Digital media]
Yes, it should work fine but please understand (1) Your flash movie must know how to process a query string passed to it and (2) IE does not support the EMBED syntax, you need to wrap the flash OBJECT tag around the EMBED just as you see on flashkit for it to work (that is for IE to pass the

[PHP-DB] Re: Subject: putting strings together with a linefeed

2004-04-16 Thread Neil Smith [MVP, Digital media]
You should appreciate there is a difference between using double quotes and single quotes around a string. So you can't say print('what up doc $mycarriagereturnvariable'); and expect it to output the value of $mycarriagereturnvariable. Next, you *can* use this construct within *double* quotes.

  1   2   >