Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 8:46 PM, Rob Gould [EMAIL PROTECTED] wrote: Let's say I have a PHP-based wine application, and it's taking a set of mySQL data that looks like this: wineidname size 123 Silver Oak 750ML 123

RE: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Bastien Koert
Select * from wine where name = 'Silver Oak' GROUP BY wineid,size bastien Date: Wed, 6 Feb 2008 17:46:52 -0800 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] PHP/mySQL question about groups Let's say I have a PHP-based wine application, and it's taking a set of mySQL

Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Andrew Ballard
On Feb 6, 2008 8:46 PM, Rob Gould [EMAIL PROTECTED] wrote: Let's say I have a PHP-based wine application, and it's taking a set of mySQL data that looks like this: wineidname size 123 Silver Oak

Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 10:59 PM, Andrew Ballard [EMAIL PROTECTED] wrote: Of course, in this case you could just avoid all the confusion with this statement as well: SELECT DISTINCT name, size FROMwine im not sure why, but i think distinct is typically way slower than group by. -nathan

Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Andrew Ballard
On Feb 6, 2008 11:20 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Feb 6, 2008 10:59 PM, Andrew Ballard [EMAIL PROTECTED] wrote: Of course, in this case you could just avoid all the confusion with this statement as well: SELECT DISTINCT name, size FROMwine im not sure why, but i

RE: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Warren Vail
-Original Message- From: Andrew Ballard [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 8:41 PM To: PHP General list Subject: Re: [PHP] PHP/mySQL question about groups On Feb 6, 2008 11:20 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Feb 6, 2008 10:59 PM, Andrew Ballard [EMAIL

Re: [PHP] PHP/MySQL not playing nicely. Server drops connection.

2007-09-03 Thread Michael Williams
On Sep 3, 2007, at 11:12 AM, Michael Williams wrote: Are you sure that Apache is running and accepting connections to / ~michwill? Does a regular HTML page show up ok? Yeah, static pages, and regular php pages load fine. It's only when I bring MySQL into the mix that things go awry.

Re: [PHP] PHP/MySQL not playing nicely. Server drops connection. . .

2007-08-31 Thread brian
Michael Williams wrote: Hi All, I recently installed PHP, APACHE, MYSQL per the method at the following site: http://switch.richard5.net/isp-in-a-box-v2/installing-mysql-on-mac-os-x/ . . .I then attempted to connect to a database (but without executing any commands on it), and I keep

Re: [PHP] PhP / MySQL problem

2007-08-29 Thread Ludovic André
Hi, I created a form asking username, password, country, etc. On the submit of this form I make a sql connection and update the database, add the user. The problem is that whenever the field 'password' is filled in, it (I don't know what) is asking to confirm the change of the password. I

Re: [PHP] PhP / MySQL problem

2007-08-29 Thread Richard Lynch
On Wed, August 29, 2007 2:03 pm, debussy007 wrote: I created a form asking username, password, country, etc. On the submit of this form I make a sql connection and update the database, add the user. The problem is that whenever the field 'password' is filled in, it (I don't know what) is

Re: [PHP] PhP / MySQL problem

2007-08-29 Thread debussy007
I'm using FF. But it asks to confirm the change of password of my MySQL users. If I comment the php/mysql lines in the .php files, I do not have such a pop-up. Ludovic André wrote: Hi, I created a form asking username, password, country, etc. On the submit of this form I make a sql

Re: [PHP] php/mysql - getting ID of query

2007-08-21 Thread mike
mysql_insert_id() mysqli_insert_id() http://us.php.net/mysql is your friend :) http://us.php.net/mysqli too! On 8/21/07, John Pillion [EMAIL PROTECTED] wrote: This is as much a mysql question as it is php. What is the most reliable way to retrieve an auto_increment key/id for a query you

Re: [PHP] PHP/MYSQL/XML Conversion

2007-07-23 Thread Nathan Nobbe
certainly it is better to use the database, as it is designed for such a purpose. -nathan On 7/23/07, Kelvin Park [EMAIL PROTECTED] wrote: I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to

Re: [PHP] PHP/MYSQL/XML Conversion

2007-07-23 Thread Chris
Kelvin Park wrote: I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to produce XML file, or convert every table in to XML file and use those XML files to relate data? I'd make the database do

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: Hi everyone, Can anyone recommend any good books/resources for php and mysql performance management? I'm more interested in the software development side (as opposed to server configuration) of things. I'm looking for anything that

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
Thanks for the response. On 6/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: Hi everyone, Can anyone recommend any good books/resources for php and mysql performance management? I'm more interested in the software development

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:17 am, Robert Cummings wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: Hi everyone, Can anyone recommend any good books/resources for php and mysql performance management? I'm more interested in the software development side (as opposed to server

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 13:31 -0400, Guillaume Theoret wrote: Thanks for the response. On 6/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: Hi everyone, Can anyone recommend any good books/resources for php and mysql

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 12:39 -0500, Richard Lynch wrote: On Wed, June 13, 2007 10:17 am, Robert Cummings wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: Hi everyone, Can anyone recommend any good books/resources for php and mysql performance management? I'm more

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:31 pm, Guillaume Theoret wrote: Thanks for the response. On 6/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: Hi everyone, Can anyone recommend any good books/resources for php and mysql performance

RE: [PHP] php / mysql performance resources

2007-06-13 Thread Daevid Vincent
I'll throw in my suggestion here as to how I implement this. Generally I evaluate how big are the tables and what do I intend to do with them. Sorting is usually a problem. Using the PHP multi_sort seems cumbersome and never seems to be as simple as letting the DB do it. I too use LEFT JOINs

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
On 6/13/07, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, June 13, 2007 12:31 pm, Guillaume Theoret wrote: Thanks for the response. On 6/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: Hi everyone, Can anyone recommend any

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
On 6/13/07, Daevid Vincent [EMAIL PROTECTED] wrote: I'll throw in my suggestion here as to how I implement this. Generally I evaluate how big are the tables and what do I intend to do with them. Sorting is usually a problem. Using the PHP multi_sort seems cumbersome and never seems to be as

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 23:41 -0400, Guillaume Theoret wrote: On 6/13/07, Daevid Vincent [EMAIL PROTECTED] wrote: ?= $employeeType[ $row['employee_type_id'] ] ? I actually use this little optimizing trick as an interview question for new hires. You'd be amazed at how many people don't

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Zoltán Németh
2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: Good morning friends, I have a script that collects data from a form and puts together a mysql query to search a database. Now, everything worked fine until I added a few new form fields... now the $_POST['var'] don't

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel
Németh [EMAIL PROTECTED] To: Christian Haensel [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Monday, May 21, 2007 9:36 AM Subject: Re: [PHP] PHP MySQL Problem 2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: Good morning friends, I have a script that collects data

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Zoltán Németh
some sense in what I'm writing here... hardly makes sense to me :oP Cheers! - Original Message - From: Zoltán Németh [EMAIL PROTECTED] To: Christian Haensel [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Monday, May 21, 2007 9:36 AM Subject: Re: [PHP] PHP

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel
I'm writing here... hardly makes sense to me :oP Cheers! - Original Message - From: Zoltán Németh [EMAIL PROTECTED] To: Christian Haensel [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Monday, May 21, 2007 9:36 AM Subject: Re: [PHP] PHP MySQL Problem 2007. 05. 21

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Zoltán Németh
Sent: Monday, May 21, 2007 9:58 AM Subject: Re: [PHP] PHP MySQL Problem 2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta: Right, here we go... this page has about 1000 lines of code, so here the relevant stuff. $s_query = SELECT * FROM database WHERE kategorie

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel
10:16 AM Subject: Re: [PHP] PHP MySQL Problem 2007. 05. 21, hétfő keltezéssel 10.04-kor Christian Haensel ezt írta: I thought so, too. But the part where it receives the data is this: $s_marke = $_POST['marke']; $s_modell = $_POST['modell']; $s_preis_von = $_POST['preis_von']; $s_preis_bis

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Richard Lynch
On Mon, May 21, 2007 2:26 am, Christian Haensel wrote: Good morning friends, I have a script that collects data from a form and puts together a mysql query to search a database. Now, everything worked fine until I added a few new form fields... now the $_POST['var'] don't reach the

Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel
a great coding-day :o)) Chris - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Christian Haensel [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, May 22, 2007 2:42 AM Subject: Re: [PHP] PHP MySQL Problem On Mon, May 21, 2007 2:26 am, Christian Haensel wrote

Re: [PHP] PHP MySQL

2007-05-13 Thread Richard Lynch
On Thu, May 10, 2007 3:42 pm, Jason Pruim wrote: I know this isn't strictly a PHP question, and I apologize in advance for that. I'm trying to setup a website for some of my customers that would allow them to update a database on their schedule, making it easier for us to have the most up to

Re: [PHP] PHP MySQL

2007-05-11 Thread Miguel J. Jiménez
Jason Pruim escribió: Hi Everyone, I know this isn't strictly a PHP question, and I apologize in advance for that. I'm trying to setup a website for some of my customers that would allow them to update a database on their schedule, making it easier for us to have the most up to date info,

Re: [PHP] PHP MySQL - Field Title

2007-05-02 Thread Richard Lynch
On Mon, April 30, 2007 12:47 am, Christian Haensel wrote: Good Morning guys and girls As I am rather lazy, I don't wanna do a data readout on my MySQL table in the following way with mysql_fetch_assoc() $data_item1=$data['xitem1']; $data_item2=$data['yitem2]; I am

Re: [PHP] PHP MySQL - Field Title

2007-04-30 Thread Auto-Deppe, C. Haensel
nevermind, I made it :o) RTFM sometimes works even for me :O)) Have a great day :o) Chris - Original Message - From: Christian Haensel [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Monday, April 30, 2007 7:47 AM Subject: [PHP] PHP MySQL - Field Title Good Morning guys and

Re: [PHP] PHP MySQL - Field Title

2007-04-30 Thread Oliver Block
Am Montag, 30. April 2007 07:47 schrieb Christian Haensel: but now I have the problem with the field names and all... can someone point me into the right direction? http://www.php.net/manual/de/ref.mysql.php php-db at lists.php.net If you need to use an assoc array, use the following SQL

Re: [PHP] PHP MySQL - Field Title

2007-04-30 Thread Christian Haensel
Haensel [EMAIL PROTECTED] Sent: Monday, April 30, 2007 1:11 PM Subject: Re: [PHP] PHP MySQL - Field Title Am Montag, 30. April 2007 07:47 schrieb Christian Haensel: but now I have the problem with the field names and all... can someone point me into the right direction? http://www.php.net/manual

Re: [PHP] php-mysql problem

2007-04-03 Thread Jochem Maas
Me2resh Lists wrote: hi i need help regarding a sql query in my php app. the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; i want to sort this query by the number of the repeated EMail counts. can anyone help me

Re: [PHP] php-mysql problem

2007-04-03 Thread clive
Me2resh Lists wrote: the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] php-mysql problem

2007-04-03 Thread Jim Moseby
i need help regarding a sql query in my php app. the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; i want to sort this query by the number of the repeated EMail counts. can anyone help me with that please ? A)

Re: [PHP] php-mysql problem

2007-04-03 Thread cajbecu
clive wrote: Me2resh Lists wrote: the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. so, you don`t know the answer, right?

Re: [PHP] php-mysql problem

2007-04-03 Thread Jochem Maas
cajbecu wrote: clive wrote: Me2resh Lists wrote: the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. so, you don`t know the

Re: [PHP] php-mysql problem

2007-04-03 Thread clive
cajbecu wrote: clive wrote: Me2resh Lists wrote: the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. so, you don`t know the answer,

Re: [PHP] php-mysql problem

2007-04-03 Thread clive
if I asked you whether your wife/girlfriend enjoyed having sex with your best friend while you are at work then you may or may not know the answer but it is hopefully clear that this is not the list to ask such a question (but no doubt that there is a list somewhere that caters to that kind of

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-27 Thread Richard Lynch
Are you making a single eshop for just one store, or are you planning on your eshop being distributed to a zillion users?... Cuz unless your store gets a MILLION hits, the generation of static HTML instead of just using PHP will probably not save you very much at all. Write the application the

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-27 Thread Richard Lynch
Your cart and all that has to open a DB connection anyway. Unless you do something horribly wrong in DB design, running one more simple query is CHEAP once you pay the price of making a connection. Benchmark it on your hardware and find out. On Sun, February 25, 2007 5:06 am, Martin Zvarík

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Peter Lauri
MySQL has caching functions I believe. Read here: http://dev.mysql.com/doc/refman/5.0/en/query-cache.html Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Martin Zvarík

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
I did a benchmark with and without caching to HTML file and it's like: 0.0031 sec (with) and 0.0160 sec (with database) I know these miliseconds don't matter, but it will have significant contribution in high-traffic website, won't it? Martin -- PHP General Mailing List

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread lists
Quoting Martin Zvarík [EMAIL PROTECTED]: I did a benchmark with and without caching to HTML file and it's like: 0.0031 sec (with) and 0.0160 sec (with database) I know these miliseconds don't matter, but it will have significant contribution in high-traffic website, won't it? Martin -- PHP

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
This benchmark is not very accurate, but you are right the database connection took most of the time. Shopping cart is stored in session - not in database. I am half-way doing the eshop I bet it will took much more than 0.01 sec to generate the final version. I was going to make this file

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Sancar Saran
Hi, If you able to access memcached. Use memcached. Put your shopping chart items, rendered html items in memcached. It was MUCH faster solution... Regards Sancar On Sunday 25 February 2007 13:59, Martin Zvarík wrote: This benchmark is not very accurate, but you are right the database

Re: [PHP] PHP/MySQL Create DB user

2007-02-07 Thread Chris
Stephen wrote: There seems to be no PHP function to create a DB user. It doesn't have one to create a database either... php can't do everything for you ;) I am trying to automate setting up virtual domains in a shared environment. Am I missing something obvious?

Re: [PHP] Php / MySQL DESC tablename

2007-01-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-21 03:05:49 -0500: I am trying to do a DESC table_name using PHP so it looks like it would it you did it from the command line. i.e. | Field | Type | Null | Key | Default | Extra |

Re: [PHP] PHP, MySQL- Interested?

2006-11-10 Thread Rory Browne
I fully endorse this as a project for you to learn php better. Having a project is the only way you'll learn. Keep in mind however that there are already frameworks which do the same thing. Check out cakePHP, or php on trax - the former AFAIK has better docs. On 11/10/06, John Sladek [EMAIL

Re: [PHP] php - mysql question

2006-10-15 Thread Chris
Dave Goodchild wrote: Hi all. I am writing a web app with a mysql back end and there is every chance one of the tables may have to handle 56+ million records. I am no mysql expert but has anyone else here ever handled that volume of data, and if so, any suggestions or caveats? The tables will of

Re: [PHP] php - mysql query issue

2006-09-15 Thread Brad Bonkoski
Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure and table data... -B Dave Goodchild wrote: Hi all.

Re: [PHP] php - mysql query issue

2006-09-15 Thread Dave Goodchild
On 15/09/06, Brad Bonkoski [EMAIL PROTECTED] wrote: Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure

Re: [PHP] php - mysql query issue

2006-09-15 Thread Andrei
Also you should check if dates.date is a DATE type, not DATETIME. Lost some time on that when I wanted to select enregs for a specific date, field was DATETIME and I was querying `date` = '2006-01-01'... :p Andy Dave Goodchild wrote: On 15/09/06, Brad Bonkoski [EMAIL PROTECTED]

Re: [PHP] php - mysql query issue

2006-09-15 Thread Richard Lynch
On Fri, September 15, 2006 7:35 am, Dave Goodchild wrote: Hi all. I am building an online events listing and when I run the following query I get the expected result set: Any ideas why not? I know it's more of a mySQL question so apologies in advance! Well, you'd have to tell us what's in

RE: [PHP] PHP/MySQL question

2006-06-05 Thread Jay Blanchard
[snip] I need to do an OR search on three columns, and AND the rest, anyone have a good way to do this? So far my searching on the MySQL lists have been fruitless more then anything, and I figured we've probably come across this ourselves at some point. [/snip] More of a MySQL question, but

Re: [PHP] PHP/MySQL question

2006-06-05 Thread Richard Lynch
On Mon, June 5, 2006 10:32 am, Wolf wrote: I have a php form that pulls data from the database (hence the problems) I need to do an OR search on three columns, and AND the rest, anyone have a good way to do this? So far my searching on the MySQL lists have been fruitless more then

Re: [PHP] PHP/MySQL question

2006-06-05 Thread Wolf
Thanks guys, I knew it was a stupid Q when I sent it, but I had another one where I encapsulated them in () blow up on me, so I figured if I asked and it was the same answer then I was on the right track. And so far all the tests have shown positive. :) Wolf More of a MySQL question, but

Re: [PHP] PHP/Mysql: Making binary field available for download - extra browser window ?

2006-06-05 Thread Richard Lynch
On Fri, June 2, 2006 12:59 am, Matthew Pegg wrote: Working on a PHP script at the moment where I want to be able to extract a file (PDF file) from a mysql database\ That's bad. Read the archives. and force the popup of the File Download dialog, to allow the user to either save or open the

RE: [PHP] PHP/Mysql: Making binary field available for download - extra browser window ?

2006-06-02 Thread Sichta, Daniel
Hi, In this case I usually creating Iframe with zero with and zero height and using your header code in the iframe sorce file. DS -Original Message- From: Matthew Pegg [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 7:59 AM To: php-general@lists.php.net Subject: [PHP] PHP/Mysql:

Re: [PHP] PHP/Mysql: Making binary field available for download - extra browser window ?

2006-06-02 Thread Jochem Maas
Matthew Pegg wrote: Hi all, Working on a PHP script at the moment where I want to be able to extract a file (PDF file) from a mysql database and force the popup of the File Download dialog, to allow the user to either save or open the document (ie. and bypass loading the file using the

Re: [PHP] php mysql problem

2006-05-02 Thread tedd
At 11:00 AM +0100 5/2/06, Ross wrote: Just say I have a db CREATE TABLE `mytable` ( `id` int(4) NOT NULL auto_increment, `fileName` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; when I add items they go id 1,2,3 etc. Whn I

Re: [PHP] php mysql problem

2006-05-02 Thread Wolf
Depending on your needs, here is another tack to think about (I know, everyone else will be gasping and running for air...) A few years ago I had to make a shopping cart. I had an archaic system that would not share information with my web/db server, so I had to write a query to dump the

Re: [PHP] php mysql problem

2006-05-02 Thread John
Ross wrote: This is my database now...I will use the item_id for the order but what if I want to change item_id 3 to item id 1? How can I push all the items down one place? How can I delete any gaps when items are deleted. CREATE TABLE `board_papers` ( `id` int(4) NOT NULL auto_increment,

Re: [PHP] php mysql problem

2006-05-02 Thread John
Ross wrote: This is my database now...I will use the item_id for the order but what if I want to change item_id 3 to item id 1? How can I push all the items down one place? How can I delete any gaps when items are deleted. CREATE TABLE `board_papers` ( `id` int(4) NOT NULL auto_increment,

Re: [PHP] php mysql problem

2006-05-02 Thread Richard Lynch
On Tue, May 2, 2006 5:00 am, Ross wrote: CREATE TABLE `mytable` ( `id` int(4) NOT NULL auto_increment, `fileName` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; when I add items they go id 1,2,3 etc. Whn I delete them gaps

RE: [PHP] php - mysql problem

2006-04-14 Thread Jay Blanchard
[snip] $sql = SELECT * FROM `table1` LEFT JOIN `table2` USING `id` WHERE ... GROUP BY `table1`.`id`; mysql_query($sql); the problem is, that, when in table2 is not matching data using that id, i lose that id from output array. but i don`t want to.. is there any posibility to keep that id?

Re: [PHP] php - mysql problem

2006-04-14 Thread cajbecu
thanks for your posting, but I have: table1 id name value table2 id x y i want to id name value x y but there is no id from table 2 that is in table2.id and i want the resource to bu something like this: id(from table 1) name value (empty) (empty) Jay Blanchard wrote: [snip] $sql =

RE: [PHP] php - mysql problem

2006-04-14 Thread Jay Blanchard
[snip] table1 id name value table2 id x y i want to id name value x y but there is no id from table 2 that is in table2.id and i want the resource to bu something like this: id(from table 1) name value (empty) (empty) SELECT table2.* FROM table1 LEFT OUTER JOIN table2 ON(table1.id =

RE: [PHP] php - mysql problem

2006-04-14 Thread Jay Blanchard
[snip] SELECT table1., *table2.* FROM table1 LEFT OUTER JOIN table2 ON(table1.id = table2.id) [/snip] Oops, typo. SELECT table1.*, table2.* FROM table1 LEFT OUTER JOIN table2 ON(table1.id = table2.id) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] php - mysql problem

2006-04-14 Thread cajbecu
thanks a lot for your posting, [cut] Posted by Fred Mitchell on December 11 2004 2:47pm [Delete] [Edit] Let's say you are doing a LEFT JOIN with a table that shares a column name in common with another table, and that you are selecting for instances where the join is missing, that is IS

Re: [PHP] php/mysql/phpMyAdmin on an iBook?

2006-03-05 Thread Larry E. Ullman
I'm thinking of getting an iBook for reasons not really to do with webbing but really need to do occasional php/mysql stuff to justify the expense. I believe that they all come with an Apache testing server installed and wondered if anyone had any success with getting php/mysql/phpMyAdmin

Re: [PHP] php/mysql/phpMyAdmin on an iBook?

2006-03-04 Thread chris smith
On 3/5/06, Paul Jinks [EMAIL PROTECTED] wrote: Hi everyone I'm thinking of getting an iBook for reasons not really to do with webbing but really need to do occasional php/mysql stuff to justify the expense. I believe that they all come with an Apache testing server installed and wondered if

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Geoff
On 6 Feb 2006 at 16:03, David Yee wrote: Hi all- is there a way have a large data result set from MySQL compressed? E.g. I have a table with over a million rows of data that I want to do a select * from on and then take that result, do some field/data manpulation, and then insert row-by-row

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Chris
Hi David, See http://www.php.net/mysql_unbuffered_query It won't load the whole lot into memory before returning it to php. David Yee wrote: Hi all- is there a way have a large data result set from MySQL compressed? E.g. I have a table with over a million rows of data that I want to do a

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
. David -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 4:16 PM To: David Yee Cc: 'php-general@lists.php.net' Subject: Re: [PHP] PHP mysql data result set compression Hi David, See http://www.php.net/mysql_unbuffered_query It won't load the whole

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread Robert Cummings
On Mon, 2006-02-06 at 19:39, David Yee wrote: I'm still not sure why the MYSQL_CLIENT_COMPRESS didn't seem to have an effect That causes the data to be transfered from the MySQL server to the client with compression. The results are still uncompressed on the client. Cheers, Rob. --

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Chris
PM To: David Yee Cc: 'php-general@lists.php.net' Subject: Re: [PHP] PHP mysql data result set compression Hi David, See http://www.php.net/mysql_unbuffered_query It won't load the whole lot into memory before returning it to php. David Yee wrote: Hi all- is there a way have a large data

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
w/o disk swapping then that would be the fastest way to do this? David -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 4:50 PM To: David Yee Cc: 'php-general@lists.php.net' Subject: Re: [PHP] PHP mysql data result set compression Hi David, From

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Chris
PROTECTED] Sent: Monday, February 06, 2006 4:16 PM To: David Yee Cc: 'php-general@lists.php.net' Subject: Re: [PHP] PHP mysql data result set compression Hi David, See http://www.php.net/mysql_unbuffered_query It won't load the whole lot into memory before returning it to php. David Yee wrote: Hi

Re: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-12 Thread Gregory Machin
Many Thanks for the help. OP 2 worked a treat.. now i need to run it at midnight, I was going to write a php script and call it vai crontab, but how could I iplament this a triger and stored procedure ? On 1/10/06, M. Sokolewicz [EMAIL PROTECTED] wrote: David Grant wrote:

Re: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread David Grant
Gregory, Gregory Machin wrote: I have a table with a timestamp column and would like to use his to calculate the age of the record . how would i go about this... I would also like to exicute a mysql stament that pasess the tables and removes fields older than say 72 hours. how would i go

RE: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread Albert
Gregory Machin wrote: I have a table with a timestamp column and would like to use his to calculate the age of the record . how would i go about this... Convert your timestamp to a unix timestamp (see mktime() function). Use the value returned by time() to calculate the difference in seconds.

RE: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread Albert
I wrote: Delete the records from the table: mysql_query(DELETE FROM table WHERE timestamp = '$timestamp') or die('Could not delete from table'); That query should be DELETE FROM table WHERE timestamp = '$timestamp' Sorry about that. Albert -- No virus found in this outgoing message.

Re: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread David Grant
Gregory, David Grant wrote: Gregory Machin wrote: I have a table with a timestamp column and would like to use his to calculate the age of the record . how would i go about this... I would also like to exicute a mysql stament that pasess the tables and removes fields older than say 72 hours.

Re: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread M. Sokolewicz
David Grant wrote: Gregory, David Grant wrote: Gregory Machin wrote: I have a table with a timestamp column and would like to use his to calculate the age of the record . how would i go about this... I would also like to exicute a mysql stament that pasess the tables and removes fields

Re: [PHP] php / mysql / js search result question

2005-12-31 Thread Drew Butler
You're right when you say this has nothing to do with PHP. Well, mostly right. I don't believe he is looking for a select box solution. I believe what is being looked for is a Google Suggest style input box auto-complete solution. Now you were right to say this is heavily dependant on JavaScript

Re: [PHP] php / mysql / js search result question

2005-12-30 Thread Richard Lynch
On Tue, December 27, 2005 2:03 am, Dave Carrera wrote: I have a very long list of customer names which i know is easy to get from a mysql result using php, no prob there. How long is very long?... But what i would like to do is offer input box and when the user enters a letter, i think this

Re: [PHP] php / mysql / js search result question

2005-12-29 Thread Greg Schnippel
Hi - It sounds like you're trying to implement something similar to google suggest which uses ajax to allow a user to navigate through a large list of entries. The google suggest method does use a lot of calls to the database but its asynchronous which eliminates cumbersome page loads.

RE: [PHP] PHP/MYSQL Connection trouble (charset)

2005-12-26 Thread Christian Ista
From: Christian Ista [mailto:[EMAIL PROTECTED] File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2) Character set '#33' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\Index' file Resource id #5 I answer to myself. In fact I reinstall MySQL 4.x

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-19 Thread Eric Butera
Could you direct me towards any good resources on general security with php/mysql? http://phpsec.org/library/ Make sure to read these: - data filtering - sql injection . . .and all the others in time. =)

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-18 Thread Paul Jinks
Richard Davey wrote: ? $connect = mysql_connect(, , ) or die(could not connect); $db = mysql_select_db() or die(could not select db); if (isset($HTTP_GET_VARS['projTitle'])) { $SQLQuery = SELECT * FROM project WHERE projTitle =

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread David Grant
Paul Jinks wrote: $SQLQuery = SELECT * FROM project WHERE projTitle = .$HTTP_GET_VARS['projTitle'] or die(SQLQuery 1 failed); $SQLQuery = SELECT * FROM project WHERE projTitle = ' . $HTTP_GET_VARS['projTitle'] . '; Not sure why you've got the or die() there.

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread Richard Davey
On 16 Dec 2005, at 12:30, Paul Jinks wrote: I have a site where users can search study projects. I'd like to be able to clicks on a project title which passes a variable to this page, which then displays all the data on that project in a table. Cool - and to a noob like me, actually pretty

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread Paul Jinks
David Grant wrote: $SQLQuery = SELECT * FROM project WHERE projTitle = ' . $HTTP_GET_VARS['projTitle'] . '; Yep, that fixed it. Thanks. I had a feeling there was a mix up with the s and 's. What's with the . s? Not sure why you've got the or die() there. I had the idea that you could

<    1   2   3   4   5   6   >