[PHP-DB] Incorrect encoding when data read from a mysql database

2010-12-03 Thread Neil Jackson
display the data correctly? Thanks for the help Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] unlink problems

2009-11-25 Thread Neil Jackson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I use the following to delete a file on a webserver if( unlink( "./$filename" ) ) { echo $filename." deleted "; $action=''; echo "document.location.href='$PHP_SELF?action=$action&code

[PHP-DB] Access a database on another domain

2009-08-02 Thread Neil Jackson
vent_name"; Two of the domains are www.hillcrestvillagers.co.za and www.pmb42.co.za. Thanks for the help Neil -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkp2RfoACgkQGgk1S8edB3I48ACeODQFinlcJIFuaxFItREabRxt zGAAn1V

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

2009-04-10 Thread Neil Smith [MVP, Digital media]
;-) It seems to me, if you intend the person to appear once, make the name column use a UNIQUE KEY. Since people will (eventually) have the same name, e.g 2x John Smiths or 2x Peters working at Novell, use some unique proxy for person, such as social security number or employee number + company,

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

2009-03-19 Thread Neil Smith [MVP, Digital media]
uld be used for this (in POST or PUT requests only) but it's not guaranteed or reliable either. So the best approach would probably be to automatically set the timezone selection using javascript, but allow the user to modify it before posting the form HTH Cheers - Neil -- PHP Datab

[PHP-DB] Re : Problem with PDO exceptions

2009-03-08 Thread Neil Smith [MVP, Digital media]
er with this : $db->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION); The default is I believe PDO::ERRMODE_SILENT which is confusing to most people the first time. http://uk2.php.net/manual/en/pdo.setattribute.php HTH Cheers - Neil -- PHP Database Mailing List (http://w

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

2009-02-24 Thread Neil Smith [MVP, Digital media]
cket-too-large.html One final top place to search for tips and ideas is always http://www.mysqlperformanceblog.com (buy the book if you get the chance, it's excellent) HTH Cheers - Neil Here is my code to reproduce the problem: PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true

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

2008-12-30 Thread Neil Smith [MVP, Digital media]
/en/select.html>SELECT. For example: mysql> CREATE TABLE test (a INT NOT NULL AUTO_INCREMENT, ->PRIMARY KEY (a), KEY(b)) ->ENGINE=MyISAM SELECT b,c FROM test2; HTHCheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2008-09-16 Thread Neil Smith [MVP, Digital media]
'Dave'), (4, 'Clara'), (5, 'Ally'), (6, 'Josh'), (9, 'Mark'), (10, 'Sophie'); INSERT INTO `harpo` (`item`, `operator`) VALUES (13, 'Mark'), (14, 'Sophie'), (15, 'Bill'), (16, 'Jessica'); HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Building WHERE SQL clauses

2008-09-16 Thread Neil Smith [MVP, Digital media]
a" ); In that case you don't need to explicitly name the tables in the USING() clause because the query parser notices that both tables have columns named the same HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2008-08-20 Thread Neil Smith [MVP, Digital media]
nd, and not unclosed quotes (3) Set $sesdb->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); Step 3 should make your code barf when it can't execute a query and immediately indicate the problem. For some reason, PDO seems to default to silent errors at least when using the S

[PHP-DB] RE : Subject: Formatting output with json_encode

2008-07-14 Thread Neil Smith [MVP, Digital media]
tml and http://docs.jquery.com/Main_Page as well as the download site http://jquery.com/ : Be sure to pop back when you've read all about those with your DB specific questions ;-) HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2008-03-21 Thread Neil Smith [MVP, Digital media]
(eg last 1 month) online, and a bunch compressed or as ARCHIVE tables on a near-line storage server for your older data (eg older than 1 month) HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Subject: ini_set ...

2008-03-21 Thread Neil Smith [MVP, Digital media]
t NOTE sections below display_errors : http://uk2.php.net/manual/en/ref.errorfunc.php#ini.display-errors HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] RE: ordering date in varchar

2008-03-13 Thread Neil Smith [MVP, Digital media]
munging/rearranging on input, so that's a job you only have to do once. Now you should add an index to the DATE column to get reasonable performance if this is a highly trafficked table in which you intend to order by the date field a lot. HTH Cheers - Neil -- PHP Database Mail

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

2008-03-10 Thread Neil Smith [MVP, Digital media]
e" which explains how to combine stuff like this so you don't get the "wrong" result http://dev.mysql.com/doc/refman/5.0/en/operator-precedence.html : "To override this order and group terms explicitly, use parentheses" (first query above) Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-12-04 Thread Neil Smith [MVP, Digital media]
n that column. You might have to use iconv() in PHP to make sure natcasesort works in the expected manner with non ISO-8859-1 or UTF-8 character sets. Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-11-27 Thread Neil Smith [MVP, Digital media]
atabase_table ORDER BY primary_key_name DESC Just use whatever cursor or LIMIT you can in Postgres to get a single record. If it's autoincrement, then the last record ordered in descending order is, the last record ;-) Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe

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...

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

2007-10-30 Thread Neil Smith [MVP, Digital media]
3 = NEW.a1; UPDATE test4 SET b4 = b4 + 1 WHERE a4 = NEW.a1; END; | HTHCheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-10-30 Thread Neil Smith [MVP, Digital media]
/devzone.zend.com/node/view/id/688#Heading3 NB this is really a database mailing list from the point of view of PHP, you might need to consider an XML list in future ;-) HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-10-21 Thread Neil Smith [MVP, Digital media]
s to be : SELECT orders.*, order_items.* FROM orders LEFT JOIN order_items ON orders.order_id = order_items.order_id UNION is completely the wrong thing here - it can only compare identical things, you're trying to join together two different data columns (order, and order_items details) HTH Che

[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 ;-)

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

2007-07-23 Thread Neil Smith [MVP, Digital media]
ly stated. @see : '21.2.3. Automatic Character Set Conversion Between Server and Client' http://www.postgresql.org/docs/8.1/static/multibyte.html HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-07-04 Thread Neil Smith [MVP, Digital media]
See http://dev.mysql.com/doc/refman/5.0/en/union.html (SELECT * FROM productgroup WHERE groupid = $productid AND label = 'Cats' ORDER BY title) UNION (SELECT * FROM productgroup WHERE groupid = $productid AND label != 'Cats' ORDER BY label,title) HTH Cheers - Neil -- PHP D

[PHP-DB] Re: Subject: auto_increment

2007-04-15 Thread Neil Smith [MVP, Digital media]
e don't magically know your table structure since you didn't post that either, it's kind of hard to tell. Ron - in future please could I ask you to post both table structure and error message, when asking "what's wrong" ? Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: ORDERing two UNION queries

2007-04-14 Thread Neil Smith [MVP, Digital media]
FROM Table [other JOINs] ) UNION (SELECT Table2.field, [other fields] FROM Table2 [other JOINs] ) ORDER BY field Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-01-21 Thread Neil Smith [MVP, Digital media]
ble. Probably I would use the date() function to generate that date as a *string*, and make sure I quoted that string correctly when making the $sql string, eg like $today = date('Y/m/d'); $sql = "SELECT * FROM events WHERE event_end> '".$today."

[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

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

2006-10-01 Thread Neil Jackson
I understand the problem! Are you saying the path is being cut leaving only the filename, or you don't know how to extract the path? Niel -- Neil Jackson DipPharm DipData Tel: +27 31 7632795 Fax: +27 31 7632960 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] user directory from a form

2006-10-01 Thread Neil Jackson
;; echo ""; echo "File name (Any attachment)"; echo ""; echo ""; I pass this to another file. I am trying to read the directory that the users file is in. ie "/srv/www/htdocs/functions/email/file.txt", I want to read the "/srv/www/htdo

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

2006-07-24 Thread Neil Smith [MVP, Digital media]
a single SQL statement, or some other simple method? SELECT count(boroughID) AS total FROM `bsp_area` GROUP BY boroughID ORDER BY total DESC LIMIT 1 .. ought to do it Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2006-07-24 Thread Neil Smith [MVP, Digital media]
exactly like a CSV, from the example data you provided. PS, please don't feel the need to prove it by posting the entire log file ;-) Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Subject: Parse Problem

2006-05-09 Thread Neil Smith [MVP, Digital media]
for solutions - the data above is pretty much unworkable without having to jump through all sorts of hoops. So lets' begin again : Your data is 'similar' to the above (what's the source ?) and what is the result you want to achieve ? HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Subject: Where did my Hard Returns go?

2006-03-01 Thread Neil Smith [MVP, Digital media]
use not newlines to display line breaks. I thought everybody knew that ;-)) Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2006-02-25 Thread Neil Smith [MVP, Digital media]
, Value FROM table GROUP BY Category HAVING Date=NewestDate HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2006-02-18 Thread Neil Smith [MVP, Digital media]
ers, then you're SOL and will have to manage a central file repository or call across servers with fopen() etc to get at the [distributed] data in the "$foldername" path. Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2006-02-05 Thread Neil Smith [MVP, Digital media]
http://www.csszengarden.com/ I know of many scripts online that I can DETERMINE visitors screen resolutions and recommend the ** Assuming javascript is turned on, or even the display device supports that detection. And bear in mind, many users *may not wish* to have their browser maximised

[PHP-DB] Freelancers, UK ?

2006-01-30 Thread Neil Smith [MVP, Digital media]
month over the two builds. Ideally in the South West UK, not expecting travel to be involved though apart from maybe an initial briefing and/or a live publish step near the end. Wave hands or email me off list and I'll send the contact details along. Cheers - Neil -- PHP Database Mailing

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: Date: Mon, 9 Jan 2006 09:24:05 -0600 Message-ID: <[EMAIL PROTECTED]

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

2006-01-06 Thread Neil Smith [MVP, Digital media]
un through Libsafe to detect buffer overflow problems. (followed by other stuff about social engineering and related admin issues) As Bob's book is so bloody good, here's the ASIN for it in case you want to read all 650 pages of good advice ;-) http://www.amazon.com/g

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

2006-01-05 Thread Neil Smith [MVP, Digital media]
mysql_select_db($this->database); Surely you meant mysql_select_db($this->db); since that's what you connected to ? Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-12-23 Thread Neil Smith [MVP, Digital media]
redirect header as if it was a browser. If you're not using CURL then you've got significant extra work to look at each individual header sent by the redirecting web server to determine which header is the redirect and which location it's sending you to (probably using a

[PHP-DB] Re: Subject: Scrolling News

2005-12-23 Thread Neil Smith [MVP, Digital media]
to php. Recommend : OrcaScroller (cross browser) http://www.greywyvern.com/javascript "Block scroller and marquee" Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: CLOSE button or 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 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 button or link W

[PHP-DB] Re: Date Formatting Question

2005-12-14 Thread Neil Smith [MVP, Digital media]
e (assuming your're using $result = mysql_fetch_assoc() as your looped result variable name) $optionlist=''; $selected_month = (integer) $_GET["Smonth"]; while ($result = mysql_fetch_assoc($link)) { $optionlist.="'.$result['strMonth']."'

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

2005-12-11 Thread Neil Smith [MVP, Digital media]
me useful stuff you can do once that's happened : http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re : [PHP-DB] MySQL Update Quandry

2005-11-28 Thread Neil Smith [MVP, Digital media]
shouldn't be a problem on this list), and it's not giving enough information unlike mysql_error() HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-11-11 Thread Neil Smith [MVP, Digital media]
ion headers again. Then *exit your script* or you will loop. Use exit; to do this. Cheers - Neil At 21:15 11/11/2005, you wrote: Do you Yahoo!? Never miss an Instant Message - Yahoo! Messenger for SMS Message-ID: <[EMAIL PROTECTED]> Date: Fri, 11 Nov 2005 15:22:14 +1100 (EST) From: J

[PHP-DB] Re:Login Auth help?

2005-11-10 Thread Neil Smith [MVP, Digital media]
a text file directly? Database, it's what they're designed for. That is it for now, if anyone is interested in the station itself to listen to or see progress please feel free to reply and I'll post the url. PS I'm working on the same system as you, online radio/we

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

2005-11-08 Thread Neil Smith [MVP, Digital media]
sferred', 'Completed', 'Withdrawn') If you do find there's a change needed to the ordering in future, probably the best way is to create a new column with the chosen ENUM ordering, then UPDATE bankdetails SET newfield=transactiontype , which makes sure MyS

[PHP-DB] Re: Complex Left Join

2005-10-31 Thread Neil Smith [MVP, Digital media]
luding some with no matching record in the m table, but you still want the d. parts of the query). Does that make sense ? Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-10-23 Thread Neil Smith [MVP, Digital media]
nsure your QA process for the link referrals really does result in a usable link:mysite index in the search engine - which of course is *the whole point of the exercise* ! HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-10-22 Thread Neil Smith [MVP, Digital media]
google doesn't or can't spider it, rather than the back link isn't there - but in that case their link popularity is ineffectual and may as well be ignored ! HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-08-31 Thread Neil Smith [MVP, Digital media]
ve text from word I would like to get text from MS word using COM. My plat form is Windows 2003 server. Do suggest me to retrieve text!! Yui Some example code here : http://www.phpbuilder.com/annotate/message.php3?id=1008686 Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To

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

2005-08-29 Thread Neil Smith [MVP, Digital media]
Date: Mon, 29 Aug 2005 07:46:52 -0500 Message-ID: <[EMAIL PROTECTED]> From: "Norland, Martin" <[EMAIL PROTECTED]> To: Reply-To: Subject: RE: [PHP-DB] Re: HTML layout and arrays (WAS : Brain not working, helpneeded :-).. >-Original Message- >Fr

[PHP-DB] Re: HTML layout and arrays (WAS : Brain not working, help needed :-)

2005-08-29 Thread Neil Smith [MVP, Digital media]
Stick with arrays so you can use stuff like for ($i=0; $i$video) { print("Index : ".$video_index."Contents : "); print_r($video); } I have 6 items on the page so I can hardcode for item 1 and Instead, use and so on. Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-08-27 Thread Neil Smith [MVP, Digital media]
width="25%"> width="25%"> HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re : Subject: floats

2005-07-20 Thread Neil Smith [MVP, Digital media]
= 23.45 is NOT equivalent toSELECT * FROM cars WHERE `gas_mil ` = 23.45 Notice the extra space in the column name. If that doesn't work do a query for SELECT * FROM cars WHERE id=52 AND gas_mil BETWEEN 23.4 AND 23.5 See what happens then, Cheers - Neil -- PHP Database Mailing List (http:

[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 : 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: Date: Wed, 22 Jun 2005

[PHP-DB] RE : Subject: Com 1

2005-06-14 Thread Neil Smith [MVP, Digital media]
p://zone.ni.com/devzone/conceptd.nsf/webmain/822FA8FC01C3C0C086256A7100546D8E Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-06-08 Thread Neil Smith [MVP, Digital media]
} Actually you meant to pass the $dateArray an index - as you didn't, PHP helpfully created sequential numeric indices. Try this instead, providing the date index string yourself : $dateArray[ date("Y.m.d H:i:s", $now - $counter) ] = array( (int)ceil(980 - ($counter * .2)))

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

2005-05-30 Thread Neil Smith [MVP, Digital media]
=16 && $remote_temp[2]<32 ) { // is in class B private address range $privip=true; $remote=$_SERVER["REMOTE_ADDR"]; } } if (ereg("^10\.([0-9]{1,3}\.){2}[0-9]{1,3}",$remote,$remote_temp)) {

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

2005-05-30 Thread Neil Smith [MVP, Digital media]
ll cover many things about quiz-question-answer which you hadn't thought of, including reporting, alternate quiz styles through an easy admin page and more. Cheers - Neil Links to tutorials or information are welcome. TIA

[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]>

[PHP-DB] RE: Subject: Form information

2005-05-26 Thread Neil Smith [MVP, Digital media]
, [23]=550, [24]=1000, .. And when you get that quantity as an array from your POST variables, just loop through it : foreach ($_POST["quantity"] as $product_id=>$amount) { print("Product ID : ".$product_id." Amount : ".$amount); } Do whatever you intend

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

2005-05-20 Thread Neil Smith [MVP, Digital media]
- the other attributes of the client record are also sent from the SQL server to the PHP client. If you do that over a network then you've added a few % to the needed bandwidth. Say, if you had 1 notes per client, it might be something to worry about - though with 1 notes per client yo

[PHP-DB] Fwd: Subject: URL question

2005-04-30 Thread Neil Smith [MVP, Digital media]
e your script works fully with the checked query string before you do this ;-) Cheers - Neil Message-Id: <[EMAIL PROTECTED]> From: "Chris Payne" <[EMAIL PROTECTED]> To: Date: Fri, 29 Apr 2005 23:00:27 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative;

Re: [PHP-DB] php3 and oracle9i client libraries doesn't compile..

2005-04-29 Thread neil smith
its oracel 9.2.0.4 installed on redhat enterprise server. Thanks for your help. neil activation.jarlibgslssf9.a libodmd9.so libvpxoafnd.so AgentEmdDiscover.jar libgx9.a libolapapi9.solibvpxos.so classgen.jar libheteroxa9_g.so liboraawt.so libvsn9.a

Re: [PHP-DB] php3 and oracle9i client libraries doesn't compile..

2005-04-28 Thread neil smith
a - thanks for that!! would that be part of an oracle library? thanks, neil >From: Martin Norland <[EMAIL PROTECTED]> >Reply-To: php-db@lists.php.net >To: php-db@lists.php.net >Subject: Re: [PHP-DB] php3 and oracle9i client libraries doesn't compile.. >Date: Thu, 28 Apr 200

[PHP-DB] php3 and oracle9i client libraries doesn't compile

2005-04-28 Thread neil smith
know what lpsa is and why it can't find it. Does anybody know how I can get php3 to work with oracle 9i client libraries? thanks in advance to anyone who can help. neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] php4 can't find tnsnames.ora oracle9 but can connectif description

2005-04-22 Thread neil smith
; ie the full description of the database alias within tnsnames.ora However this is not good, so if you have any other idea please let me know. I'm flumuxed. thanks, neil >From: Christopher Jones <[EMAIL PROTECTED]> >To: neil smith <[EMAIL PROTECTED]> >CC: php-db@lis

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

2005-04-22 Thread Neil Smith [MVP, Digital media]
t; > lpt1 "; // or ... Send command to windows LPT1 port exec($command); // Send the command string directly to the operating system ?> HTH Cheers - Neil At 21:44 21/04/2005 +, you wrote: Message-ID: <[EMAIL PROTECTED]> To: php-db@lists.php.net Repl

[PHP-DB] php4 can't find tnsnames.ora oracle9 but can connect if description hardcoded

2005-04-19 Thread neil smith
a value name_domain that apparently is appended to the alias in tnsnames.ora but accounting for this still doesn't let me connect to oracle . It's as if tnsnames.ora cannot be found. I've changed the permissions to 777 for the whole directory structure and I can successfully use tnsnames.ora with sqlplus or tnsping. Does anybody have any ideas what is going wrong? Is this a bug? thanks, neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Subject: Web Printing

2005-04-01 Thread Neil Smith [MVP, Digital media]
then it's somewhat guesswork (I've done both). But if we're assuming that you're users have laser printers you *must* use CSS to do the print layout, PHP "line height guessing" will not work for you. Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Forms...

2005-03-10 Thread Neil Smith [MVP, Digital media]
an only have a ~single~ attribute with a particular name. The typo above has two copies if the 'value' attribute which would prevent the XHTML being valid XML. HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-03-08 Thread Neil Smith [MVP, Digital media]
ged. But with 3 column solution proposed, to add another round you just insert the data ;-) With 23 columns you have to modify the database schema to add that extra column. Both solutions probably require you to modify your php code a tiny bit for that 'future' mod. Ch

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

2005-03-07 Thread Neil Smith [MVP, Digital media]
ed in this way takes up no space if a (new) user hasn't completed any rounds (for example ;-) HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-03-06 Thread Neil Smith [MVP, Digital media]
d to put the content back in to a database though, or you'll double up the line count. Cheers - Neil At 04:47 06/03/2005 +, you wrote: Message-ID: <[EMAIL PROTECTED]> From: "Ron Piggott" <[EMAIL PROTECTED]> To: "PHP DB" Date: Sat, 5 Mar 2005

Re: [PHP-DB] timestamp

2005-01-29 Thread Neil Smith [MVP, Digital media]
amp), where strtotime can format most textual time formats recognised by the OS. Cheers - Neil From: Balwant Singh <[EMAIL PROTECTED]> i am facing a problem i have timestamp in string format --> Fri Jan 28 19:53:09 2005 now i want to get the date from it. is it possible? pls. help. o

Re: [PHP-DB] last record

2005-01-24 Thread neil
hile ($row = mysql_fetch_assoc($result)) { This is fine while there is only one order by appended to the query but if there is none or more than one it doesn't work so well Thanks Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] last record

2005-01-24 Thread neil
t? Thanks Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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/IS

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

2005-01-18 Thread Neil Smith [MVP, Digital media]
7;t store them in the database ;-) Cheers - Neil At 18:59 18/01/2005 +, you wrote: Message-ID: <[EMAIL PROTECTED]> From: "mel list_php" <[EMAIL PROTECTED]> To: php-db@lists.php.net Date: Tue, 18 Jan 2005 11:30:12 + Mime-Version: 1.0 Content-Type: text/plain; format=flo

[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 Age gro

Re: [PHP-DB] date conversions

2004-12-15 Thread neil
. Interesting comment on 'normal'. I suspect that numerically more of the world uses dmy than mdy. There is a lot more of the world outside the US than in it. Thanks again for all your help. Neil <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yeah, this is my problem

[PHP-DB] date conversions

2004-12-15 Thread neil
from strtotime to do this. Any ideas? Thanks Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2004-12-01 Thread Neil Smith [MVP, Digital media]
ore appropriate newsgroup. Evolt.org is a good place to start, or www.alistapart.com Cheers - Neil At 18:21 01/12/2004 +, you wrote: Reply-To: <[EMAIL PROTECTED]> From: "balwantsingh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Wed, 1 Dec 2004 14:39:15 +0530 M

[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 : http://msdn.microsoft.com/library/default.asp?url=/libr

[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) { Cheers - Neil function validate_form() { valid=true; df=document.forms["myform"]; var regex="del\[\d+\]"; for (i=0; i<df.elements.length) { if (df[i].type=="c

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

2004-11-16 Thread Neil Smith [MVP, Digital media]
before the [ and ] are because [ and ] are used in regular expressions to denote character classes eg [0-9*£$] or [a-zA-Z0-9] and so on. The \d+ denotes 'any digits' and is a shorthand way to write [0-9] Cheers - Neil At 09:46 16/11/2004 +, you wrote: Message-Id: <[EMAIL PRO

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

2004-11-13 Thread Neil Smith [MVP, Digital media]
t mailings. Congratulations on your new payload, scum. I hope you have fun unsubscribing from them all. Cheers - Neil At 11:54 13/11/2004 +, you wrote: From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: multipart/relate

[PHP-DB] Re: MySQL Data Not Returned

2004-11-13 Thread Neil Smith [MVP, Digital media]
ail address if you count them manually. Cheers - Neil At 11:54 13/11/2004 +, you wrote: I search the list like so: $email="[EMAIL PROTECTED]"; $query=mysqli_query($cnn,"SELECT * FROM mailinglist WHERE email='$email'"); When I do: Echo mysqli_num_rows($query); I

[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

[PHP-DB] Re: Subject: Form Processing

2004-10-16 Thread Neil Smith [MVP, Digital media]
actions. NB : You need to give them buttons different HTML *ID's* so that any javascript you use can tell the buttons apart in the DOM (otherwise the HTML DOM would be invalid, as you can't have more than one element on your web page with the same ID) HTH Cheers - Neil At 12:52 16/

[PHP-DB] Re: Subject: Print

2004-09-09 Thread Neil Smith [MVP, Digital media]
e PHP lists unless you intend to use PHP/Windows native print functions. A little web research will also help. Cheers - Neil At 08:05 09/09/2004 +, you wrote: From: "Ng Hwee Hwee" <[EMAIL PROTECTED]> To: "PHP DB List" <[EMAIL PROTECTED]> Date: Thu, 9 Sep 2004 16:

Re: [PHP-DB] functions via event handlers

2004-09-07 Thread Neil Smith [MVP, Digital media]
need to unload the current page to get information form the server. Useful examples here : http://jibbering.com/2002/4/httprequest.html Cheers - Neil At 11:09 07/09/2004 +, you wrote: Message-ID: <[EMAIL PROTECTED]> Date: Mon, 6 Sep 2004 19:55:51 -0400 From: Joseph Crawford <[E

[PHP-DB] Re: php Form Validation help

2004-09-07 Thread Neil Smith [MVP, Digital media]
27;]. "-" .$_POST['p-suffix']; >The next question id for both phone number and area code. If I want to validate the zip code and ensure a minimum of X characters in the field, numbers only how would I do this? if (strlen($zip_str) < 5) { print 'Please

[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,

[PHP-DB] joined tables

2004-08-24 Thread neil
) My first question is - is this the best way to do stuff like this? My second question is - how do I insert new data? eg to insert Mary Stevens (the first name Mary already exists) I hope this all makes some sense Thanks Neil table - family id name 1 jones 2 smith 3

  1   2   3   4   >