Re: [PHP-DB] VAR_DUMP INTO PHP VARIABLES

2014-06-19 Thread Toby Hart Dyke
If you have the response in a variable, $response: $responseCode = $response[return]['responsecode']; $responseMessage = $response[return]['responseMessage']; $transactionID = $response[return]['transactionID']; This isn't really the right list to ask this question - nothing to do with

Re: [PHP-DB] VAR_DUMP INTO PHP VARIABLES

2014-06-19 Thread Toby Hart Dyke
; } On Thu, Jun 19, 2014 at 3:48 PM, Toby Hart Dyke t...@hartdyke.com wrote: If you have the response in a variable, $response: $responseCode = $response[return]['responsecode']; $responseMessage = $response[return]['responseMessage']; $transactionID = $response[return]['transactionID

Re: [PHP-DB] Re: mysql query

2013-08-22 Thread Toby Hart Dyke
Notepad++ will do syntax highlighting. Go to Language P PHP with a PHP file open, and see the colours change! It should be automatic - are you using something other than 'php' as a file extension? Toby On 8/22/2013 5:27 PM, Vinay Kannan wrote: Jim, I know this is a stupid question to

Re: [PHP-DB] mysql query

2013-08-21 Thread Toby Hart Dyke
1) What is the error message? 2) This has an error: values ('$upc', $qnt,'$mnf','$itm', odrpt, 0, $stk) Missing '$' in front of 'odrpt'. Toby On 8/22/2013 12:48 AM, Ethan Rosenberg wrote: Dear List - I can't figure this out mysql describe Inventory;

Re: [PHP-DB] Re: Problem with query

2013-06-25 Thread Toby Hart Dyke
What Jim means is here in the manual: http://www.php.net/manual/en/language.types.array.php#language.types.array.donts In a nutshell: Always use quotes around a string literal array index. For example, /$foo['bar']/ is correct, while /$foo[bar]/ is not. The reason is that without the

Re: [PHP-DB] Re: Problem with query

2013-06-25 Thread Toby Hart Dyke
The original post is here: http://news.php.net/php.db/48751 On 6/25/2013 1:02 PM, Michael Oki wrote: I'm sorry I've not been following the last three responses. In a nutshell, what EXACTLY does the poster of this issue want? On 25 June 2013 11:06, Toby Hart Dyke t...@hartdyke.com wrote

Re: [PHP-DB] Probleme upper accents

2013-04-05 Thread Toby Hart Dyke
It looks similar to this bug: http://bugs.php.net/bug.php?id=54379 - possibly fixed in a later version? Your PHP is pretty elderly. Toby On 4/5/2013 1:38 PM, André LAGADEC wrote: Hi, On my application PHP with Oracle database, all work fine with Oracle9i client, but when I test with

Re: [PHP-DB] Saving Image in mySQL

2013-03-20 Thread Toby Hart Dyke
You're right - you're pulling $file out of thin air. Once uploaded, the file is stored in $_FILES['file']['tmp_name'], and you need to manually read the data into $file yourself. Something like: file_get_contents($_FILES['file']['tmp_name']) Toby On 3/19/2013 8:15 PM, Ron Piggott

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Toby Hart Dyke
On 9/10/2012 4:54 PM, Jim Giner wrote: On 9/10/2012 11:10 AM, Lester Caine wrote: Jim Giner wrote: On 9/10/2012 10:49 AM, Bastien Koert wrote: On Mon, Sep 10, 2012 at 9:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Reading up on the pdostatement class. Wondering what the intent of

RE: [PHP-DB] convert special characters.

2012-08-10 Thread Toby Hart Dyke
-Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Friday, August 10, 2012 12:08 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] convert special characters. On Aug 9, 2012, at 5:08 PM, Toby Hart Dyke wrote: -Original Message- From

RE: [PHP-DB] convert special characters.

2012-08-09 Thread Toby Hart Dyke
-Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Thursday, August 09, 2012 10:19 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] convert special characters. On Aug 9, 2012, at 5:41 AM, Karl DeSaulniers wrote: On Aug 9, 2012, at 5:37 AM, Karl

RE: [PHP-DB] Re: Multiple Access to Database

2012-01-15 Thread Toby Hart Dyke
..and when you've read all that, go here: http://www.mysql.com/downloads/workbench/ Much easier than doing it all on the command line! Toby -Original Message- From: David Robley [mailto:robl...@aapt.net.au] Sent: Sunday, January 15, 2012 10:46 AM To: php-db@lists.php.net Subject:

RE: [PHP-DB] Simple MySQL sample code runs out of memory

2011-10-27 Thread Toby Hart Dyke
-Original Message- From: p...@umpquanet.com [mailto:p...@umpquanet.com] Sent: Thursday, October 27, 2011 8:00 PM To: php-db@lists.php.net Subject: [PHP-DB] Simple MySQL sample code runs out of memory Running PHP 5.3.5 on FreeBSD 8.2 connecting to a MySQL 5.1.55 server. snip

RE: [PHP-DB] Re: SELECT

2011-10-17 Thread Toby Hart Dyke
Though the operators are = and =, not = and =. Toby -Original Message- From: Jim Giner [mailto:jim.gi...@albanyhandball.com] Sent: Monday, October 17, 2011 1:58 PM To: php-db@lists.php.net Subject: [PHP-DB] Re: SELECT I would do it this way: Where $sel_d = (the day # you want)

RE: [PHP-DB] SELECT syntax

2011-10-12 Thread Toby Hart Dyke
Not terribly elegant, but this should work: SELECT `trivia_answer_1` AS `trivia_answer` FROM `Bible_trivia` WHERE `answer`=1 UNION SELECT `trivia_answer_2` AS `trivia_answer` FROM `Bible_trivia` WHERE `answer`=2 UNION SELECT `trivia_answer_3` AS `trivia_answer` FROM `Bible_trivia` WHERE

RE: [PHP-DB] Working with large datasets

2011-10-10 Thread Toby Hart Dyke
It sounds as though you don't have an index on the right field. 8 million records should be no problem if you have the right indexes applied, and you're not trying to do anything too complicated. Toby -Original Message- From: Jason Pruim [mailto:li...@pruimphotography.com] Sent:

RE: [PHP-DB] Working with large datasets

2011-10-10 Thread Toby Hart Dyke
You have a field in your WHERE clause that isn't indexed - you need an index. Try something like this: ALTER TABLE `Database`.`Table` ADD INDEX `state`(`state`); Think about it - you're asking for the rows that have a certain value in the 'state' field. If you don't provide the database with

RE: [PHP-DB] Left Join

2011-08-07 Thread Toby Hart Dyke
Is the design under your control? If so, you need to change it. Your store_list.store_name field breaks the first rule of relational databases - it isn't atomic. That means that you have two pieces of information there - the store name and store address. You even have a '~' there to separate them

Re: [PHP-DB] PHP4 vs PHP5

2011-05-01 Thread Toby Hart Dyke
See: http://us2.php.net/manual/en/migration5.php That gives details of migration from PHP4 to PHP5. There are also guides for migration between each major point release: http://us2.php.net/manual/en/migration51.php http://us2.php.net/manual/en/migration52.php

Re: [PHP-DB] combining the results of mysql query and finding the unique tuples in php

2011-01-07 Thread Toby Hart Dyke
On 1/7/2011 12:10 AM, Fahim M wrote: Hi I have a certain number of mysql tables(relation), say 50, some of them having 5 fields and some with 6 fields. a particular search item may be found in multiple tables with multiple rows. I am using a loop to find all those. My problem is I want to first

Re: [PHP-DB] Two forms on one page

2011-01-03 Thread Toby Hart Dyke
On 1/3/2011 10:52 PM, Ethan Rosenberg wrote: Dear List - I would like to have two(2) forms in one PHP script. I would like to have the forms appear sequentially; ie, that the first form would appear, the data would be entered, and then the second form would appear, the data would be

Re: [PHP-DB] Resetting auto_increment

2010-12-14 Thread Toby Hart Dyke
On 12/14/2010 1:02 PM, Ethan Rosenberg wrote: At 12:38 PM 12/14/2010, Daniel Brown wrote: On Tue, Dec 14, 2010 at 12:34, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for all your help. How do I reset auto_increment so that the primary key will start from 1. The