Re: [PHP-DB] File Upload in PHP

2012-02-01 Thread Ege Sertçetin
Hi Trinath, You can use ini_set() function to change ini settings only for your upload script. http://php.net/manual/en/function.ini-set.php However, you cannot change any parameter you want. There is a list about php.ini parameters. As I remember, you just can set PHP_INI_ALL and PHP_INI

Re: [PHP-DB] File Upload in PHP

2012-02-01 Thread Karl DeSaulniers
Sry, not better help... better luck. :) Best, Karl On Feb 1, 2012, at 7:01 AM, Karl DeSaulniers wrote: I would set post_max_size in your htaccess for the directory where your upload.php file is. Or base64 your file and upload 8Mb chunks, then reassemble and store. but I am sure someone has

Re: [PHP-DB] File Upload in PHP

2012-02-01 Thread Karl DeSaulniers
I would set post_max_size in your htaccess for the directory where your upload.php file is. Or base64 your file and upload 8Mb chunks, then reassemble and store. but I am sure someone has a better solution than I. also, I may be wrong on this too, but this is a PHP General question, not data

Re: [PHP-DB] Subscription Suspensions

2012-01-31 Thread Ron Piggott
On Tue, Jan 31, 2012 at 6:35 PM, Ron Piggott wrote: Hi Everyone. I manage an e-mail list. I am trying to add a new function into it: suspensions. The idea is that someone wouldn’t have to unsubscribe. Instead there would be a record of their suspension in the table member_subscription_su

Re: [PHP-DB] Subscription Suspensions

2012-01-31 Thread Matijn Woudt
On Tue, Jan 31, 2012 at 6:35 PM, Ron Piggott wrote: > > Hi Everyone. > > I manage an e-mail list.  I am trying to add a new function into it: > suspensions.  The idea is that someone wouldn’t have to unsubscribe.  Instead > there would be a record of their suspension in the table > member_subsc

Re: [PHP-DB] php & adodb book suggestins

2012-01-27 Thread Lester Caine
David McGlone wrote: I started with PHP just before PHP5 was finally released, so never used PHP4, > and found ADOdb very early on so have never used anything else. One gets stuck > in one's way when something simply works ... Probably why I'm finding PDO such a > backwards step having been

Re: [PHP-DB] php & adodb book suggestins

2012-01-27 Thread David McGlone
On Thu, 2012-01-26 at 11:59 +, Lester Caine wrote: > David McGlone wrote: > > On Thu, 2012-01-26 at 08:45 +, Lester Caine wrote: > >> > David McGlone wrote: > >>> > > can anyone suggest any good up to date books out there on php& > >>> > adodb. > >> > The only documentation on ADOdb

Re: [PHP-DB] php & adodb book suggestins

2012-01-26 Thread Matijn Woudt
On Thu, Jan 26, 2012 at 12:06 PM, David McGlone wrote: > On Thu, 2012-01-26 at 08:45 +, Lester Caine wrote: >> David McGlone wrote: >> > can anyone suggest any good up to date books out there on php&  adodb. > >> The only documentation on ADOdb is the website >> http://adodb.sourceforge.net/#d

Re: [PHP-DB] php & adodb book suggestins

2012-01-26 Thread Lester Caine
David McGlone wrote: On Thu, 2012-01-26 at 08:45 +, Lester Caine wrote: > David McGlone wrote: > > can anyone suggest any good up to date books out there on php& adodb. > The only documentation on ADOdb is the website > http://adodb.sourceforge.net/#docs ... has ANYBODY seen it des

Re: [PHP-DB] php & adodb book suggestins

2012-01-26 Thread David McGlone
On Thu, 2012-01-26 at 08:45 +, Lester Caine wrote: > David McGlone wrote: > > can anyone suggest any good up to date books out there on php& adodb. > The only documentation on ADOdb is the website > http://adodb.sourceforge.net/#docs ... has ANYBODY seen it described in a php > book? > Whil

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-18 Thread Karl DeSaulniers
Hi Niel, Thanks for taking the time to respond. Comments below. On Jan 18, 2012, at 11:14 AM, Niel Archer wrote: Ok, so getting closer to the goal.. slight hiccup. I am experimenting with some UNION and INNER JOIN and don't know if I am doing this correctly or if this is the correct way to do t

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-18 Thread Niel Archer
> Ok, so getting closer to the goal.. slight hiccup. I am experimenting > with some UNION and INNER JOIN and don't know if I am doing this > correctly or if this is the correct way to do this. > > PREFACE: > I have now moved colors and sizes to their own tables and added a > product options

Re: [PHP-DB] Multiple Access to Database

2012-01-17 Thread Matijn Woudt
Ethan, you've send the same question a few days ago. There's no point in asking the same question twice. Matijn -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-16 Thread Karl DeSaulniers
Ok, so getting closer to the goal.. slight hiccup. I am experimenting with some UNION and INNER JOIN and don't know if I am doing this correctly or if this is the correct way to do this. PREFACE: I have now moved colors and sizes to their own tables and added a product options table that ha

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: [PH

Re: [PHP-DB] Multiple Access to Database

2012-01-14 Thread Karl DeSaulniers
I believe you would set that up through PHP. Best, Karl On Jan 14, 2012, at 9:55 PM, Ethan Rosenberg wrote: Dear List - I have a database: mysql> show tables; +-+ | Tables_in_hospital2 | +-+ | Intake3 | | Visit3 | +---

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-13 Thread B. Aerts
On 13/01/12 03:47, tamouse mailing lists wrote: On Thu, Jan 12, 2012 at 1:12 AM, B. Aerts wrote: Karl, I'm somewhat limited to reading posts, so I might have missed something, but can you explain why you wanted to avoid the 3rd table solution ? Because depending on that question, I can offer

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-12 Thread tamouse mailing lists
On Thu, Jan 12, 2012 at 1:12 AM, B. Aerts wrote: > Karl, > > I'm somewhat limited to reading posts, so I might have missed something, but > can you explain why you wanted to avoid the 3rd table solution ? > > Because depending on that question, I can offer two other solutions, but > they have thei

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-12 Thread Karl DeSaulniers
On Jan 12, 2012, at 1:12 AM, B. Aerts wrote: Karl, I'm somewhat limited to reading posts, so I might have missed something, but can you explain why you wanted to avoid the 3rd table solution ? Because depending on that question, I can offer two other solutions, but they have their own

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread B. Aerts
Karl, I'm somewhat limited to reading posts, so I might have missed something, but can you explain why you wanted to avoid the 3rd table solution ? Because depending on that question, I can offer two other solutions, but they have their own limitations. Solution 1: the "2,5nd" table. you cr

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
Yeah, I was being somewhat facetious about the colors of a shirt. :) I agree on the items and attributes drill-down before implementation though. There will be more than T-Shirts. Watches, book-covers, etc, etc. So I need to find a general logic to cover the items and attributes of each item

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
Ok, thanks. On Jan 11, 2012, at 11:53 AM, Peter Lind wrote: *snip* How does set() know the difference between say the first row (1) + the fifth row (5) and the second row (2) + fouth row (4) in the bit set? The sum of both are the same. I am sure I am congfusing something. Ummm ... if

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Peter Lind
*snip* > > How does set() know the difference between say > the first row (1) + the fifth row (5) and the second row (2) + fouth row (4) > in the bit set? The sum of both are the same. > I am sure I am congfusing something. > Ummm ... if you're asking how set figures out how bitmasks differ, then

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
On Jan 11, 2012, at 3:29 AM, Karl DeSaulniers wrote: On Jan 11, 2012, at 12:45 AM, Peter Lind wrote: On Jan 11, 2012 7:13 AM, "Karl DeSaulniers" wrote: On Jan 10, 2012, at 10:49 PM, Karl DeSaulniers wrote: On Jan 10, 2012, at 9:30 AM, B. Aerts wrote: On 08/01/12 23:35, Karl DeSauln

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
On Jan 11, 2012, at 12:45 AM, Peter Lind wrote: On Jan 11, 2012 7:13 AM, "Karl DeSaulniers" wrote: On Jan 10, 2012, at 10:49 PM, Karl DeSaulniers wrote: On Jan 10, 2012, at 9:30 AM, B. Aerts wrote: On 08/01/12 23:35, Karl DeSaulniers wrote: On Jan 8, 2012, at 10:36 AM, Bastien wrot

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-10 Thread Peter Lind
On Jan 11, 2012 7:13 AM, "Karl DeSaulniers" wrote: > > > On Jan 10, 2012, at 10:49 PM, Karl DeSaulniers wrote: > >> >> On Jan 10, 2012, at 9:30 AM, B. Aerts wrote: >> >>> On 08/01/12 23:35, Karl DeSaulniers wrote: On Jan 8, 2012, at 10:36 AM, Bastien wrote: > > > On

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-10 Thread Karl DeSaulniers
On Jan 10, 2012, at 10:49 PM, Karl DeSaulniers wrote: On Jan 10, 2012, at 9:30 AM, B. Aerts wrote: On 08/01/12 23:35, Karl DeSaulniers wrote: On Jan 8, 2012, at 10:36 AM, Bastien wrote: On 2012-01-08, at 7:27 AM, Niel Archer wrote: -- Niel Archer niel.archer (at) blueyonder.co.uk

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-10 Thread Karl DeSaulniers
On Jan 10, 2012, at 9:30 AM, B. Aerts wrote: On 08/01/12 23:35, Karl DeSaulniers wrote: On Jan 8, 2012, at 10:36 AM, Bastien wrote: On 2012-01-08, at 7:27 AM, Niel Archer wrote: -- Niel Archer niel.archer (at) blueyonder.co.uk Hello phpers and sqlheads, If you have a moment, I have a

Re: [PHP-DB] Receiving Error- Error: user account already exists..

2012-01-10 Thread Niel Archer
> I keep receiving the following error..( Error: user account already exists.. > ) although I don't have any data in my table. Any help would be appreciated. > > The code follows: > > > > > > > session_start(); > > > > > > include ('dbc.php'); > > > > > > > > if (isset($

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-10 Thread B. Aerts
On 08/01/12 23:35, Karl DeSaulniers wrote: On Jan 8, 2012, at 10:36 AM, Bastien wrote: On 2012-01-08, at 7:27 AM, Niel Archer wrote: -- Niel Archer niel.archer (at) blueyonder.co.uk Hello phpers and sqlheads, If you have a moment, I have a question. INTRO: I am trying to set up categor

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-08 Thread Karl DeSaulniers
On Jan 8, 2012, at 10:36 AM, Bastien wrote: On 2012-01-08, at 7:27 AM, Niel Archer wrote: -- Niel Archer niel.archer (at) blueyonder.co.uk Hello phpers and sqlheads, If you have a moment, I have a question. INTRO: I am trying to set up categories for a web site. Each item can belong to

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-08 Thread Bastien
On 2012-01-08, at 7:27 AM, Niel Archer wrote: > > -- > Niel Archer > niel.archer (at) blueyonder.co.uk >> Hello phpers and sqlheads, >> If you have a moment, I have a question. >> >> INTRO: >> I am trying to set up categories for a web site. >> Each item can belong to more than one category.

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-07 Thread Niel Archer
-- Niel Archer niel.archer (at) blueyonder.co.uk > Hello phpers and sqlheads, > If you have a moment, I have a question. > > INTRO: > I am trying to set up categories for a web site. > Each item can belong to more than one category. > > IE: Mens, T-Shirts, Long Sleeve Shirts, etc.. etc.. > (Sorr

Re: [PHP-DB] isError ADODB

2012-01-05 Thread Lester Caine
David McGlone wrote: I am not ADO savvy, but the error message you got is the same as what > I get in MySQL. > On this line, try.. > > If($this->isError($this->db)) if( $this->db->isError() ) BUT if( !$this->db ) { not connected } is the more normal first check > Hoping that fixes it for

Re: [PHP-DB] isError ADODB

2012-01-05 Thread David McGlone
On Mon, 2012-01-02 at 20:34 -0600, Karl DeSaulniers wrote: > I am not ADO savvy, but the error message you got is the same as what > I get in MySQL. > On this line, try.. > > If($this->isError($this->db)) > > Hoping that fixes it for you. > Best, Thanks Karl. I finally got to try this and it w

Re: [PHP-DB] isError ADODB

2012-01-02 Thread Karl DeSaulniers
I am not ADO savvy, but the error message you got is the same as what I get in MySQL. On this line, try.. If($this->isError($this->db)) Hoping that fixes it for you. Best, Karl On Jan 2, 2012, at 8:29 PM, David McGlone wrote: If(isError($this->db)) Karl DeSaulniers Design Drumm http://

Re: [PHP-DB] Abstraction library

2011-12-31 Thread David McGlone
On Fri, 2011-12-30 at 17:36 +, Lester Caine wrote: > David McGlone wrote: > > On Fri, 2011-12-30 at 11:23 -0500, David McGlone wrote: > >> > On Fri, 2011-12-30 at 12:27 +, Lester Caine wrote: > >>> > > David McGlone wrote: > > > > Hi everyone I got a quick question. I'm wondering

Re: [PHP-DB] Abstraction library

2011-12-30 Thread Lester Caine
David McGlone wrote: On Fri, 2011-12-30 at 11:23 -0500, David McGlone wrote: > On Fri, 2011-12-30 at 12:27 +, Lester Caine wrote: > > David McGlone wrote: > > > Hi everyone I got a quick question. I'm wondering if anyone is using a > > > DB abstraction layer such as PEAR DB. I've

Re: [PHP-DB] Abstraction library

2011-12-30 Thread David McGlone
On Fri, 2011-12-30 at 11:23 -0500, David McGlone wrote: > On Fri, 2011-12-30 at 12:27 +, Lester Caine wrote: > > David McGlone wrote: > > > Hi everyone I got a quick question. I'm wondering if anyone is using a > > > DB abstraction layer such as PEAR DB. I've used PEAR DB in the past and > > >

Re: [PHP-DB] Abstraction library

2011-12-30 Thread David McGlone
On Fri, 2011-12-30 at 12:27 +, Lester Caine wrote: > David McGlone wrote: > > Hi everyone I got a quick question. I'm wondering if anyone is using a > > DB abstraction layer such as PEAR DB. I've used PEAR DB in the past and > > knew it's been on it's way to extinction, but never looked into >

Re: [PHP-DB] Abstraction library

2011-12-30 Thread Lester Caine
David McGlone wrote: Hi everyone I got a quick question. I'm wondering if anyone is using a DB abstraction layer such as PEAR DB. I've used PEAR DB in the past and knew it's been on it's way to extinction, but never looked into alternatives or any other way to replace it. Now this has come back t

Re: [PHP-DB] Tables and foreign keys

2011-12-26 Thread Karl DeSaulniers
Thank you! On Dec 26, 2011, at 4:12 AM, Amit Tandon wrote: Dear Karl Refer Wiki entry. The last diagram shows one to many relationship in many ways. That may help you in clearing your doubts about the comma which is a way of representing the relationship Quoted from MS Access example On

Re: [PHP-DB] Tables and foreign keys

2011-12-26 Thread Amit Tandon
Dear KarlRefer Wiki entry. The last diagram shows one to many relationship in many ways. That may help you in clearing your doubts about the comma which is a way of representing the relationship Quoted from MS Access example One-To-Many Rela

Re: [PHP-DB] Tables and foreign keys

2011-12-26 Thread Karl DeSaulniers
On Dec 26, 2011, at 3:05 AM, Amit Tandon wrote: regds amit "The difference between fiction and reality? Fiction has to make sense." On Mon, Dec 26, 2011 at 1:55 PM, Karl DeSaulniers >wrote: On Dec 26, 2011, at 1:57 AM, Amit Tandon wrote: Dear Karl Foreign key is a good

Re: [PHP-DB] Tables and foreign keys

2011-12-26 Thread Amit Tandon
regds amit "The difference between fiction and reality? Fiction has to make sense." On Mon, Dec 26, 2011 at 1:55 PM, Karl DeSaulniers wrote: > On Dec 26, 2011, at 1:57 AM, Amit Tandon wrote: > > Dear Karl >> >> Foreign key is a good option (provided you use InnoDB database) to >>

Re: [PHP-DB] Tables and foreign keys

2011-12-26 Thread Karl DeSaulniers
On Dec 26, 2011, at 1:57 AM, Amit Tandon wrote: Dear Karl Foreign key is a good option (provided you use InnoDB database) to automate the deletion/updation of cart details when you remove cart. Besides 1:1 cardinality is good or bad can only be decided on the semantics of your tables. A

Re: [PHP-DB] Tables and foreign keys

2011-12-25 Thread Amit Tandon
Dear Karl Foreign key is a good option (provided you use InnoDB database) to automate the deletion/updation of cart details when you remove cart. Besides 1:1 cardinality is good or bad can only be decided on the semantics of your tables. As a an aside, if it is 1:1 cardinality, then you can prob

Re: [PHP-DB] Set Mssql Application name in connection string

2011-12-13 Thread Matijn Woudt
On Tue, Dec 13, 2011 at 10:58 PM, Dan Rowe wrote: > Hey Matijn, > > Thanks for the tip. We did send it there the day we submitted it, so its > good to know we were on the right track. Unfortunately it didn't gain any > traction or any status updates on the bug tracker. > > Figured I would send to

Re: [PHP-DB] Set Mssql Application name in connection string

2011-12-13 Thread Dan Rowe
Hey Matijn, Thanks for the tip. We did send it there the day we submitted it, so its good to know we were on the right track. Unfortunately it didn't gain any traction or any status updates on the bug tracker. Figured I would send to this list in case it was more applicable to the user base and n

Re: [PHP-DB] Set Mssql Application name in connection string

2011-12-13 Thread Matijn Woudt
On Tue, Dec 13, 2011 at 1:33 PM, Dan Rowe wrote: > We needed to be able to set the application name in a mssql connection > string, but php doesn't current toy support it. > > This can be very helpful while debugging/profiling php-mssql from the SQL > server side of things. > > Without this patch

Re: [PHP-DB] sqlite

2011-11-30 Thread Tamara Temple
David McGlone wrote: > On Tue, 2011-11-29 at 16:31 -0600, Tamara Temple wrote: > > David McGlone wrote: > > > places.sqlite is mozilla's bookmarks db and I was trying to read this > > > db, but so far I've been unsuccessful. > > > > > > sqlite ver: 2.8.17 > > > PHP version: PHP 5.3.3-1ubuntu9.6

Re: [PHP-DB] Problem with mysql and php

2011-11-29 Thread Jason Pruim
Jim, Similar yes... But this was specifically about replacing distinct with something since it was taking WAY to long... But it did evolve into a very similar conversation :) Jason Pruim pru...@gmail.com On Nov 29, 2011, at 6:25 PM, Jim Giner wrote: > Didn't the OP begin this very same sub

Re: [PHP-DB] sqlite

2011-11-29 Thread David McGlone
On Tue, 2011-11-29 at 16:31 -0600, Tamara Temple wrote: > David McGlone wrote: > > places.sqlite is mozilla's bookmarks db and I was trying to read this > > db, but so far I've been unsuccessful. > > > > sqlite ver: 2.8.17 > > PHP version: PHP 5.3.3-1ubuntu9.6 with Suhosin-Patch > > php5-sqlite:

RE: [PHP-DB] Problem with mysql and php

2011-11-29 Thread Amos Jean-Baptiste
> From: joker_mos...@hotmail.com > To: phps...@gmail.com > Date: Tue, 29 Nov 2011 23:07:13 -0500 > CC: phildob...@gmail.com; php-db@lists.php.net > Subject: Re: [PHP-DB] Problem with mysql and php > > > > Le 2011-11-28 à 22:38, Bastien Koert a écrit : > >

Re: [PHP-DB] Problem with mysql and php

2011-11-29 Thread Jim Giner
Didn't the OP begin this very same subject a month ago? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Problem with mysql and php

2011-11-29 Thread Dan Rowe
Try running this : http://mysqltuner.pl/mysqltuner.pl If the server has been up for over 24hrs it gives a lot of good insight and things to try tuning wise as a starting point. It'll uncover a lot of common configuration issues or MySQL server level bottlenecks. -Dan (apologizes for the top post

Re: [PHP-DB] Problem with mysql and php

2011-11-29 Thread Tamara Temple
Jason Pruim wrote: > Given the following 2 queries: > > "SELECT DISTINCT areacode FROM main WHERE state = '{$query_exploded[0]}'"; > > "SELECT DISTINCT areacode FROM main"; > > The second displays ALOT faster Like by minutes... the first one is what > I really want though Currently wo

Re: [PHP-DB] sqlite

2011-11-29 Thread Tamara Temple
David McGlone wrote: > places.sqlite is mozilla's bookmarks db and I was trying to read this > db, but so far I've been unsuccessful. > > sqlite ver: 2.8.17 > PHP version: PHP 5.3.3-1ubuntu9.6 with Suhosin-Patch > php5-sqlite: 5.3.3-1ubuntu9.6 Okay, first off, mozilla uses sqlite3, not sqlite2,

Re: [PHP-DB] Problem with mysql and php

2011-11-28 Thread Amos Jean-Baptiste
Le 2011-11-28 à 22:38, Bastien Koert a écrit : On Mon, Nov 28, 2011 at 9:19 PM, Phil Dobbin wrote: On 29/11/11 02:08, "Jason Pruim" wrote: PostgreSQL? ;-)... In all seriousness... Would it help or change it in anyway? :) I am free to use what I want (I believe) on this project...

Re: [PHP-DB] Problem with mysql and php

2011-11-28 Thread Bastien Koert
On Mon, Nov 28, 2011 at 9:19 PM, Phil Dobbin wrote: > On 29/11/11 02:08, "Jason Pruim" wrote: > >>> PostgreSQL? >>> >>> ;-)... >> >> In all seriousness... Would it help or change it in anyway? :) >> >> I am free to use what I want (I believe) on this project... > > It's well worth looking into. P

Re: [PHP-DB] Problem with mysql and php

2011-11-28 Thread Phil Dobbin
On 29/11/11 02:08, "Jason Pruim" wrote: >> PostgreSQL? >> >> ;-)... > > In all seriousness... Would it help or change it in anyway? :) > > I am free to use what I want (I believe) on this project... It's well worth looking into. Postgres can handle far bigger db's much quicker than MySQL but

Re: [PHP-DB] Problem with mysql and php

2011-11-28 Thread Jason Pruim
Jason Pruim pru...@gmail.com On Nov 28, 2011, at 8:58 PM, Phil Dobbin wrote: > On 29/11/11 01:38, "Jason Pruim" wrote: > >> Given the following 2 queries: >> >> "SELECT DISTINCT areacode FROM main WHERE state = '{$query_exploded[0]}'"; >> >> "SELECT DISTINCT areacode FROM main"; >> >> The

Re: [PHP-DB] Problem with mysql and php

2011-11-28 Thread Phil Dobbin
On 29/11/11 01:38, "Jason Pruim" wrote: > Given the following 2 queries: > > "SELECT DISTINCT areacode FROM main WHERE state = '{$query_exploded[0]}'"; > > "SELECT DISTINCT areacode FROM main"; > > The second displays ALOT faster Like by minutes... the first one is what I > really want tho

Re: [PHP-DB] Efficiency of DDD programing

2011-11-20 Thread Tamara Temple
Fanda wrote: > how to solve this problem: > > If I write a repository for each entity, article and autor for > example, article is composed of autor and some other things, then I > want to select some articles: > > $articles = $articleRepo->findLast(10); > foreach ($articles as $article) { >

Re: [PHP-DB] Efficiency of DDD programing

2011-11-20 Thread Karl DeSaulniers
foreach ($articles as $author => $article) { echo("author".$i." =".$author."article=".$article); } I think. I could be corrected. Not to mention, did you mean to spell your function like this? getAutor? Or did you mean getAuthor? HTH, Best, Karl Sent from losPhone On Nov 20, 2011, at 8:24

Re: [PHP-DB] Need help with updating existing mysql records with something else

2011-11-12 Thread tamouse mailing lists
2011/11/11 Amit Tandon : > U can "update" the record with following > > === > $result = mysql_query("UPDATE  tax set mwool40_ > totqty = $res", $connection) or die("error > updating database"); Won't this update every row in the table? I think you'd want: $result = mysql_query("UPDATE ta

Re: [PHP-DB] Prepared Statements

2011-11-12 Thread tamouse mailing lists
On Fri, Nov 11, 2011 at 10:41 AM, Ron Piggott wrote: > > $dsh = 'mysql:host=localhost;dbname='.$database; > $dbh = new PDO($dsh, $username, $password); > > #query for the authorization code > > $query = "SELECT `authorization_code` FROM > `directory_listing_update_authorizations` WHERE NOW() BET

Re: [PHP-DB] Prepared Statements

2011-11-11 Thread Matijn Woudt
On Fri, Nov 11, 2011 at 5:41 PM, Ron Piggott wrote: > > I have two questions about Prepared Statements from the code below: > > #1: > The purpose of the first $query is to determine if the authorization code > supplied is both accurate and also live > - When the authorization code is generated it

Re: [PHP-DB] Need help with updating existing mysql records with something else

2011-11-10 Thread Amit Tandon
Dear Guru U can "update" the record with following === $result = mysql_query("UPDATE tax set mwool40_ totqty = $res", $connection) or die("error updating database"); if (mysql_affected_rows($connection) != 1 (/* no of rows that should be updated */) { die("Update problem") ; } The only

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Richard Quadling
On 9 November 2011 23:52, Matijn Woudt wrote: > On Thu, Nov 10, 2011 at 12:32 AM, Ron Piggott > wrote: >> >> I am wondering how phpmyadmin makes Excel files "on the fly" --- Is it a >> class? >> > > They used PHPExcel in the past, but they had to remove because of > license issues. Don't know wha

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Matijn Woudt
On Thu, Nov 10, 2011 at 12:32 AM, Ron Piggott wrote: > > I am wondering how phpmyadmin makes Excel files "on the fly" --- Is it a > class? > They used PHPExcel in the past, but they had to remove because of license issues. Don't know what they're currently using, but if you can live with LGPL, PH

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Jim Giner
The problem you are describing is where the fields are not enclosed in quotes. Are you specifying to enclose alpha type fields in quotes, and leaving number-only fields without? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Ron Piggott
erseOfTheDay.info -Original Message- From: Jimi Thompson Sent: Tuesday, November 08, 2011 4:59 PM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Exporting mySQL to Excel The best option I've found is to write to a file that is then sent to the browser for download.

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Richard Quadling
On 8 November 2011 18:31, Ron Piggott wrote: > What is the preferred method used to export mySQL to Excel within the context > of PHP?  I have looked on Google and found a wide variety of options.  Ron > > Ron Piggott If the mysql server is set to allow remote access, then you could use ODBC and

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Karl DeSaulniers
CSV is probably the least bloated. IMHO. But I guess it depends on what your trying to get as an end result. Best, Karl On Nov 8, 2011, at 3:59 PM, Jimi Thompson wrote: The best option I've found is to write to a file that is then sent to the browser for download. Are there others? Yes but t

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Jimi Thompson
The best option I've found is to write to a file that is then sent to the browser for download. Are there others? Yes but that's the one I've had the best experience with. It seems to work reliably regardless of browser or version of Office or any thing else. HTH! On Tue, 2011-11-08 at 13:31

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Ron Piggott
Trying to setup so within the administration screen the users may download the database. Ron Piggott www.TheVerseOfTheDay.info -Original Message- From: Bastien Koert Sent: Tuesday, November 08, 2011 1:33 PM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Bastien Koert
On Tue, Nov 8, 2011 at 1:33 PM, Bastien Koert wrote: > On Tue, Nov 8, 2011 at 1:31 PM, Ron Piggott > wrote: >> What is the preferred method used to export mySQL to Excel within the >> context of PHP?  I have looked on Google and found a wide variety of >> options.  Ron >> >> Ron Piggott >> >> >

Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Bastien Koert
On Tue, Nov 8, 2011 at 1:31 PM, Ron Piggott wrote: > What is the preferred method used to export mySQL to Excel within the context > of PHP?  I have looked on Google and found a wide variety of options.  Ron > > Ron Piggott > > > > www.TheVerseOfTheDay.info > phpmyadmin supports this easily --

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

2011-10-28 Thread tamouse mailing lists
On Thu, Oct 27, 2011 at 10:04 PM, wrote: > Something more fundamental is going on. > > Here is simpler code which still reproduces the problem. > I get: > > PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to > allocate 20 bytes) in xx3.php on line 26 > > What's up with

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

2011-10-27 Thread Karl DeSaulniers
Also, I don't know how your displaying this info, but if you have a good number of entries, you may want to look into pagination. Then your only grabbing a certain number of sets at a time not the whole database. Best, Karl On Oct 28, 2011, at 12:29 AM, Karl DeSaulniers wrote: Hmmm.. Try th

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

2011-10-27 Thread Karl DeSaulniers
Here is a link for researching. http://php.net/manual/en/function.mysql-fetch-assoc.php HTH, Best, Karl On Oct 28, 2011, at 12:35 AM, Karl DeSaulniers wrote: Also, I don't know how your displaying this info, but if you have a good number of entries, you may want to look into pagination. Then

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

2011-10-27 Thread Karl DeSaulniers
Hmmm.. Try this.. for($i=0; $i<$num_rows; $i++){ $c = mysql_result($result,$i,"contract"); echo sprintf( "|%13d |%7d |\n", $c, $i ); mysql_free_result($c); //Free the memory with this. } or this.. for($i=0; $i<$num_rows; $i++){ $c = mysql_result($result,$i,"contrac

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

2011-10-27 Thread php
On Thu, Oct 27, 2011 at 10:43:48PM -0500, Karl DeSaulniers wrote: > Maybe this.. > HTH, > > ... > > $result = mysql_query( $qry, $db_conn ) or die( mysql_error() . "\n" ); > > $num_rows = mysql_numrows($result); > if(!$result || ($num_rows <= 0)){ > echo "Error displaying info"; > } > else

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

2011-10-27 Thread Karl DeSaulniers
Maybe this.. HTH, 0){ for($i=0; $i<$num_rows; $i++){ $c = mysql_result($result,$i,"contract"); echo sprintf( "|%13d |%7d |\n", $c, $i ); } } ?> Best, Karl On Oct 27, 2011, at 6:59 PM, p...@umpquanet.com wrote: Karl DeSaulniers Design Drumm http://designdrumm.com --

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

2011-10-27 Thread php
On Thu, Oct 27, 2011 at 09:50:14PM -0500, tamouse mailing lists wrote: > > Still, an inner and outer loop don't really seem necessary here, as > you're spinning through one set of data, there doesn't seem a need to > run through it that way. A more traditional method is to do something > like: >

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

2011-10-27 Thread tamouse mailing lists
On Thu, Oct 27, 2011 at 9:36 PM, wrote: > On Thu, Oct 27, 2011 at 09:17:21PM -0500, tamouse mailing lists wrote: >> >> That said, I think there must be a way to do this in SQL. > > Absolutely, there's a way to do this in SQL; > > "select contract, sum(1) from test_table group by contract" > > > B

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

2011-10-27 Thread php
On Thu, Oct 27, 2011 at 09:17:21PM -0500, tamouse mailing lists wrote: > > That said, I think there must be a way to do this in SQL. Absolutely, there's a way to do this in SQL; "select contract, sum(1) from test_table group by contract" But as I said, simply counting is not the intent of the

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

2011-10-27 Thread Karl DeSaulniers
That and maybe look into mysql_free_result() or mysql_freeresult() Best, Karl Sent from losPhone On Oct 27, 2011, at 9:08 PM, "Toby Hart Dyke" wrote: > > > -Original Message- > From: p...@umpquanet.com [mailto:p...@umpquanet.com] > Sent: Thursday, October 27, 2011 8:00 PM > To: php-

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

2011-10-27 Thread tamouse mailing lists
On Thu, Oct 27, 2011 at 8:56 PM, tamouse mailing lists wrote: > On Thu, Oct 27, 2011 at 6:59 PM,   wrote: >> Running PHP 5.3.5 on FreeBSD 8.2 connecting to a MySQL 5.1.55 >> server. >> >> Why does this code (below) run out of memory?  It queries >> test_table for all rows, all fields and sorts the

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. $row =

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

2011-10-27 Thread tamouse mailing lists
On Thu, Oct 27, 2011 at 6:59 PM, wrote: > Running PHP 5.3.5 on FreeBSD 8.2 connecting to a MySQL 5.1.55 > server. > > Why does this code (below) run out of memory?  It queries > test_table for all rows, all fields and sorts them by the numeric > 'contract' field.  It then iterates through the row

RE: [PHP-DB] PHP + SQLite - Issues with update

2011-10-21 Thread Prashant Prabhudesai (pprabhud)
-Original Message- > From: n.a.mor...@brighton.ac.uk [mailto:n.a.mor...@brighton.ac.uk] > Sent: Friday, October 21, 2011 2:33 AM > To: Prashant Prabhudesai (pprabhud); php-db@lists.php.net > Subject: RE: [PHP-DB] PHP + SQLite - Issues with update > > Try using the query: >

Re: [PHP-DB] SELECT

2011-10-21 Thread tamouse mailing lists
On Fri, Oct 21, 2011 at 2:09 AM, Ford, Mike wrote: >> -Original Message- >> From: tamouse mailing lists [mailto:tamouse.li...@gmail.com] >> Sent: 20 October 2011 21:37 >> >> On Tue, Oct 18, 2011 at 5:36 AM, Ford, Mike >> wrote: >> >> -Original Message- >> >> From: Ron Piggott [mai

RE: [PHP-DB] PHP + SQLite - Issues with update

2011-10-21 Thread N . A . Morgan
Try using the query: $db->query("update SERVER set Token = '$intoken' where IPAddress ='192.168.1.100'"); You are trying to update all rows with $intoken, where the column Token is unique. Regards, Neil Morgan -Original Message- From: Prashant Prabhudesai [mailto:pprab...@cisco.com]

RE: [PHP-DB] SELECT

2011-10-21 Thread Ford, Mike
> -Original Message- > From: tamouse mailing lists [mailto:tamouse.li...@gmail.com] > Sent: 20 October 2011 21:37 > > On Tue, Oct 18, 2011 at 5:36 AM, Ford, Mike > wrote: > >> -Original Message- > >> From: Ron Piggott [mailto:ron.pigg...@actsministries.org] > >> Sent: 17 October 2

Re: [PHP-DB] SELECT

2011-10-20 Thread tamouse mailing lists
On Thu, Oct 20, 2011 at 3:36 PM, tamouse mailing lists wrote: > On Tue, Oct 18, 2011 at 5:36 AM, Ford, Mike wrote: >>> -Original Message- >>> From: Ron Piggott [mailto:ron.pigg...@actsministries.org] >>> Sent: 17 October 2011 18:38 >>> >>> I need help creating a mySQL query that will sele

Re: [PHP-DB] SELECT

2011-10-20 Thread tamouse mailing lists
On Tue, Oct 18, 2011 at 5:36 AM, Ford, Mike wrote: >> -Original Message- >> From: Ron Piggott [mailto:ron.pigg...@actsministries.org] >> Sent: 17 October 2011 18:38 >> >> I need help creating a mySQL query that will select the correct >> introduction message for a website I am making.  The

Re: [PHP-DB] Re: SELECT

2011-10-20 Thread tamouse mailing lists
On Mon, Oct 17, 2011 at 12:58 PM, Jim Giner wrote: > I would do it this way: > > Where >  $sel_d = (the day # you want) >  $sel_m = (the month # you want) > > The "where" clause would be: > > Where  (start_month => $sel_m and start_day => $sel_d) and >     (end_month =< $sel_m and end_day =< $sel_

Re: [PHP-DB] SELECT

2011-10-18 Thread Jim Giner
Ron - Mike here is correct. I gave you a start, but it had a problem with it. Hope I didn't have you running around too much. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    3   4   5   6   7   8   9   10   11   12   >