Re: [PHP] MySQL close connection, what's the purpose?

2006-04-01 Thread Jasper Bryant-Greene
John Nichel wrote: Jasper Bryant-Greene wrote: snip I never close connections; PHP does that for me and has never caused any problems doing that. I don't see it as sloppy programming, it is a documented feature that PHP closes resources such as database connections at the end of the script.

[PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread Martin Zvarík
Hi, I was wondering why is it necessary to use mysql_close() at the end of your script. If you don't do it, it works anyways, doesn't it? MZ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread Richard Lynch
On Fri, March 31, 2006 2:30 pm, Martin Zvarík wrote: I was wondering why is it necessary to use mysql_close() at the end of your script. If you don't do it, it works anyways, doesn't it? Yes, but... Suppose you write a script to read data from one MySQL server, and then insert it into

Re: [PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread Martin Zvarík
Richard Lynch wrote: On Fri, March 31, 2006 2:30 pm, Martin Zvarík wrote: I was wondering why is it necessary to use mysql_close() at the end of your script. If you don't do it, it works anyways, doesn't it? Yes, but... Suppose you write a script to read data from one MySQL

Re: [PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread Anthony Ettinger
On 3/31/06, Martin Zvarík [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Fri, March 31, 2006 2:30 pm, Martin Zvarík wrote: I was wondering why is it necessary to use mysql_close() at the end of your script. If you don't do it, it works anyways, doesn't it? Yes, but...

Re: [PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread tedd
At 10:30 PM +0200 3/31/06, Martin Zvarík wrote: Hi, I was wondering why is it necessary to use mysql_close() at the end of your script. If you don't do it, it works anyways, doesn't it? MZ MZ: I always close the connection right after my query -- force of habit. It's like leaving the

Re: [PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread chris smith
On 4/1/06, tedd [EMAIL PROTECTED] wrote: At 10:30 PM +0200 3/31/06, Martin Zvarík wrote: Hi, I was wondering why is it necessary to use mysql_close() at the end of your script. If you don't do it, it works anyways, doesn't it? MZ MZ: I always close the connection right after my

Re: [PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread Anthony Ettinger
On 3/31/06, chris smith [EMAIL PROTECTED] wrote: On 4/1/06, tedd [EMAIL PROTECTED] wrote: At 10:30 PM +0200 3/31/06, Martin Zvarík wrote: Hi, I was wondering why is it necessary to use mysql_close() at the end of your script. If you don't do it, it works anyways, doesn't it? MZ

Re: [PHP] MySQL close connection, what's the purpose?

2006-03-31 Thread chris smith
On 4/1/06, Anthony Ettinger [EMAIL PROTECTED] wrote: On 3/31/06, chris smith [EMAIL PROTECTED] wrote: On 4/1/06, tedd [EMAIL PROTECTED] wrote: At 10:30 PM +0200 3/31/06, Martin Zvarík wrote: Hi, I was wondering why is it necessary to use mysql_close() at the end of your script.

[PHP] mysql query/$post problem

2006-03-27 Thread Mark
I havnt even tried this query but i know its wrong can anyone help! *** ?php include(header.php); include(connect.php); $comp_id = $_SESSION['comp_id']; $user_id = $_SESSION['user_id']; // Grab variables and insert into database $avname = $_POST['avname'];

Re: [PHP] mysql query/$post problem

2006-03-27 Thread nicolas figaro
Mark a écrit : I havnt even tried this query but i know its wrong can anyone help! *** ?php include(header.php); include(connect.php); don't you need a session_start() somewhere ? (or it's in the header.php or connect.php perhaps ?) $comp_id =

Re: [PHP] mysql query/$post problem

2006-03-27 Thread chris smith
On 3/27/06, Mark [EMAIL PROTECTED] wrote: I havnt even tried this query but i know its wrong can anyone help! *** ?php include(header.php); include(connect.php); $comp_id = $_SESSION['comp_id']; $user_id = $_SESSION['user_id']; // Grab variables and

Re: [PHP] mysql query/$post problem

2006-03-27 Thread PHP Mailer
(avatars) VALUES ('$avname')WHERE id ='$user_id'); As Nicolas said, it is important that you understand your abilities to debug these queries by outputting them through simple commands such as echo or even the php-mysql function mysql_error(); give these a try Let us know how it works out! -- PHP

Re: [PHP] mysql query/$post problem

2006-03-27 Thread Jasper Bryant-Greene
PHP Mailer wrote: Mark skrev: [snip] $query = INSERT INTO users AVATARS WHERE id =$user_id '','$avname'); mysql_query($query);s [snip] I am trying to insert the value of $avname into the users table, into the avatar field. I think what you are trying to do is coordinated a bit wrong,

[PHP] Apache/PHP/MySQL/OpenSSL upgrade question

2006-03-24 Thread Jason Gerfen
I know this might be slightly off topic but I just upgraded PHP/MySQL/OpenSSL and Apache to the latest stable release for each project and so far so good. The one problem I am encountering is dealing with SSL and apachectl not accepting the command 'apachectl startssl' as it is depreciated

Re: [PHP] Apache/PHP/MySQL/OpenSSL upgrade question

2006-03-24 Thread Petar Nedyalkov
On Friday 24 March 2006 17:24, Jason Gerfen wrote: I know this might be slightly off topic but I just upgraded PHP/MySQL/OpenSSL and Apache to the latest stable release for each project and so far so good. The one problem I am encountering is dealing with SSL and apachectl not accepting

Re: [PHP] Apache/PHP/MySQL/OpenSSL upgrade question

2006-03-24 Thread Julius Hacker
Jason Gerfen wrote: I know this might be slightly off topic but I just upgraded PHP/MySQL/OpenSSL and Apache to the latest stable release for each project and so far so good. The one problem I am encountering is dealing with SSL and apachectl not accepting the command 'apachectl startssl

RE: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread Dan Parry
-Original Message- From: sathyashrayan [mailto:[EMAIL PROTECTED] Sent: 21 March 2006 12:20 To: php-general@lists.php.net Subject: [PHP] Inserting data at runtime (php,mysql) I have given a task to create a site which is a clone of www.onelook.com. As a first stage I have downloaded a list

Re: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread sathyashrayan
- Original Message - From: Thorsten Suckow-Homberg [EMAIL PROTECTED] To: sathyashrayan [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, March 21, 2006 6:00 PM Subject: Re: [PHP] Inserting data at runtime (php,mysql) The connection is successful but the data

Re: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread sathyashrayan
- Original Message - From: Dan Parry [EMAIL PROTECTED] To: 'sathyashrayan' [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, March 21, 2006 6:12 PM Subject: RE: [PHP] Inserting data at runtime (php,mysql) [snip] $conn=mysql_connect( );/*with the required parameters

Re: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread sathyashrayan
Yes it is a error.Thanks. - Original Message - From: Dave Goodchild To: sathyashrayan Sent: Tuesday, March 21, 2006 6:16 PM Subject: Re: [PHP] Inserting data at runtime (php,mysql) Yes, but it should be $conn, not conn. There is no $ in front of the variable name

Re: [PHP] Re: Inserting data at runtime (php,mysql)

2006-03-21 Thread sathyashrayan
- Original Message - From: João Cândido de Souza Neto [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, March 21, 2006 5:54 PM Subject: [PHP] Re: Inserting data at runtime (php,mysql) It gives you any error? No the data are not getting inserted. -- PHP General

Re: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread Robin Vickery
On 21/03/06, sathyashrayan [EMAIL PROTECTED] wrote: - Original Message - From: Dan Parry [EMAIL PROTECTED] To: 'sathyashrayan' [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, March 21, 2006 6:12 PM Subject: RE: [PHP] Inserting data at runtime (php,mysql) [snip

RE: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread Dan Parry
,mysql) - Original Message - From: Dan Parry [EMAIL PROTECTED] To: 'sathyashrayan' [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, March 21, 2006 6:12 PM Subject: RE: [PHP] Inserting data at runtime (php,mysql) [snip] $conn=mysql_connect( );/*with the required parameters

Re: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread sathyashrayan
- Original Message - From: Dan Parry [EMAIL PROTECTED] To: 'sathyashrayan' [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, March 21, 2006 6:19 PM Subject: RE: [PHP] Inserting data at runtime (php,mysql) conn denotes a constant where the value you are assigning

[PHP] Re: Inserting data at runtime (php,mysql)

2006-03-21 Thread João Cândido de Souza Neto
It gives you any error? sathyashrayan wrote: I have given a task to create a site which is a clone of www.onelook.com. As a first stage I have downloaded a list of English words (only words not meaning) in a text format. I have created a data structure in the mysql database. And wrote

[PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread sathyashrayan
I have given a task to create a site which is a clone of www.onelook.com. As a first stage I have downloaded a list of English words (only words not meaning) in a text format. I have created a data structure in the mysql database. And wrote the following code to insert data into the table

Re: [PHP] Inserting data at runtime (php,mysql)

2006-03-21 Thread Thorsten Suckow-Homberg
The connection is successful but the data are not getting inserted into the table. I need to insert all the words into the table. When I change the insert statement with one insert at a time, I can insert values to the database. For exampel: $qure = INSERT INTO dict VALUES (1,'apple'); Do

[PHP] MySQL NOT IN Query not working

2006-03-16 Thread Kevin Murphy
Anyone want to point me to why this isn't working: $hr_query = select dp_lname,dp_fname,dp_id FROM dir_all WHERE dp_id NOT IN (SELECT sup_id FROM dir_title2) ORDER BY dp_lname; There are two tables, dir_all (the main list

Re: [PHP] MySQL NOT IN Query not working

2006-03-16 Thread Miles Thompson
At 08:41 PM 3/16/2006, Kevin Murphy wrote: Anyone want to point me to why this isn't working: $hr_query = select dp_lname,dp_fname,dp_id FROM dir_all WHERE dp_id NOT IN (SELECT sup_id FROM dir_title2) ORDER BY dp_lname;

Re: [PHP] MySQL NOT IN Query not working

2006-03-16 Thread Ligaya Turmelle
Kevin Murphy wrote: Anyone want to point me to why this isn't working: $hr_query = select dp_lname,dp_fname,dp_id FROM dir_all WHERE dp_id NOT IN (SELECT sup_id FROM dir_title2) ORDER BY dp_lname; There are two tables, dir_all (the main list of everyone) and

Re: [PHP] MySQL NOT IN Query not working

2006-03-16 Thread Kevin Murphy
Yup. Thats the problem. I'm running 4.0.21. Thanks. -- Kevin Murphy Webmaster - Information and Marketing Services Western Nevada Community College www.wncc.edu (775) 445-3326 On Mar 16, 2006, at 4:48 PM, Miles Thompson wrote: At 08:41 PM 3/16/2006, Kevin Murphy wrote: Anyone want to

RE: [PHP] Mysql Rows

2006-03-06 Thread jblanchard
[snip] You must have a column that is sequential in some way. An auto-incremented column, timestamp, or some other device that will allow you to step through regardless of gaps in sequence. If you do not have such a column then you could add one. You see, now that's the problem. If you have a

RE: [PHP] Mysql Rows

2006-03-06 Thread tedd
As such, if you don't renumber, then the only thing left is to use a timestamp, I guess. [/snip] No, if you have gaps you can still step through sequentially, like 14, 15, 18, 19, 20... It's the gaps that are the problem. I have no problem understanding why there are gaps in a dB and dealing

Re: [PHP] Mysql Rows

2006-03-06 Thread Ray Hauge
On Monday 06 March 2006 07:56, tedd wrote: So, I'm still trying to find a simple way around this problem. Either I renumber the id field OR provide an external counter to present to the user. I don't see any other solutions, does anyone? Thanks. tedd I haven't followed this thread very

Re: [PHP] Mysql Rows

2006-03-06 Thread Barry
tedd wrote: As such, if you don't renumber, then the only thing left is to use a timestamp, I guess. [/snip] No, if you have gaps you can still step through sequentially, like 14, 15, 18, 19, 20... It's the gaps that are the problem. I have no problem understanding why there are gaps in a

Re: [PHP] Mysql Rows

2006-03-06 Thread tedd
Well it seems you output it via PHP so count it extern in PHP. And changing ID values is a no-go! You will never have any relation possibilities if you alter the ID fields. In short. You mess everthing up with it. There are count functions in MySQL that gives you the counted rows or output it

Re: [PHP] Mysql Rows [and whats the difference between Navigational and Relational DBs]

2006-03-06 Thread Jochem Maas
Miles Thompson wrote: I hope the following will be helpful, and it is a bit of a rant .. thank god someone ranted on this already :-) I wasn't feeling up to it but it's also one of those cases that you can't help but speak out. ;-) -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Mysql Rows

2006-03-06 Thread jblanchard
[snip] That's the reason when I started this thread I made it clear that I was NOT talking about a relational dB but rather a simple flat file. What I find interesting in all of this exchange -- however -- is that everyone agree's renumbering the id of a dB is something you don't do, but no

Re: [PHP] Mysql Rows

2006-03-06 Thread Jochem Maas
tedd wrote: Well it seems you output it via PHP so count it extern in PHP. And changing ID values is a no-go! You will never have any relation possibilities if you alter the ID fields. In short. You mess everthing up with it. There are count functions in MySQL that gives you the counted rows

Re: [PHP] Mysql Rows

2006-03-06 Thread Dusty Bin
Another point to consider, is that Tedds method of renumbering the rows, *may* not preserve the original sequence. I have not checked the mysql source, but if some delete activity has occurred in the table, then there will be holes in the data, in some circumstances, inserting further records to

Re: [PHP] Mysql Rows

2006-03-06 Thread Anthony Ettinger
On 3/6/06, Dusty Bin [EMAIL PROTECTED] wrote: Another point to consider, is that Tedds method of renumbering the rows, *may* not preserve the original sequence. I have not checked the mysql source, but if some delete activity has occurred in the table, then there will be holes in the data, in

RE: [PHP] Mysql Rows

2006-03-06 Thread Jim Moseby
What I find interesting in all of this exchange -- however -- is that everyone agree's renumbering the id of a dB is something you don't do, but no one can come up with a concrete (other than relational) reason why. If you don't care that a given record may have a different,

RE: [PHP] Mysql Rows

2006-03-06 Thread Miles Thompson
At 10:56 AM 3/6/2006, tedd wrote: As such, if you don't renumber, then the only thing left is to use a timestamp, I guess. [/snip] No, if you have gaps you can still step through sequentially, like 14, 15, 18, 19, 20... It's the gaps that are the problem. I have no problem understanding why

Re: [PHP] Mysql Rows

2006-03-06 Thread Anthony Ettinger
On 3/6/06, Jim Moseby [EMAIL PROTECTED] wrote: What I find interesting in all of this exchange -- however -- is that everyone agree's renumbering the id of a dB is something you don't do, but no one can come up with a concrete (other than relational) reason why. If you don't care

Re: [PHP] Mysql Rows

2006-03-06 Thread Paul Novitski
At 08:57 AM 3/6/2006, tedd wrote: What I find interesting in all of this exchange -- however -- is that everyone agree's renumbering the id of a dB is something you don't do, but no one can come up with a concrete (other than relational) reason why. It's simply -- concretely -- inefficient

Re: [PHP] Mysql Rows

2006-03-06 Thread Chris
Barry: I realize that relational dB's are out if one does this -- and -- I fully understand why. That's the reason when I started this thread I made it clear that I was NOT talking about a relational dB but rather a simple flat file. What I find interesting in all of this exchange --

RE: [PHP] Mysql Rows [END of thread]

2006-03-06 Thread tedd
Hi gang: ?php echo str_repeat(Okay, I give up! , 100); ? Miles said: Why are we still chasing this thread? No need to pursue this thread anymore -- I'll just address the statements put to me. Why does he even have to see gaps? Just present the info, unless he wants to see the ID.

Re: [PHP] Mysql Rows

2006-03-05 Thread tedd
R O B said: That Rod guy, he's such a card! I'd add something, but Jay has already covered my list in a more recent email than this one to which I'm responding :) jblanchard (who I think is Rod) said: A SQL question on a PHP mailing list usually gets more than ribbing. ;) No harm done --

Re: [PHP] Mysql Rows

2006-03-05 Thread chris smith
On 3/6/06, tedd [EMAIL PROTECTED] wrote: R O B said: That Rod guy, he's such a card! I'd add something, but Jay has already covered my list in a more recent email than this one to which I'm responding :) jblanchard (who I think is Rod) said: A SQL question on a PHP mailing list usually

RE: [PHP] Mysql Rows

2006-03-05 Thread jblanchard
[snip] R O B said: That Rod guy, he's such a card! I'd add something, but Jay has already covered my list in a more recent email than this one to which I'm responding :) jblanchard (who I think is Rod) said: [/snip] I am definitely not Rod. [snip] For sake of argument, let's agree that

Re: [PHP] Mysql Rows

2006-03-05 Thread Curt Zirzow
On Sun, Mar 05, 2006 at 08:01:07AM -0500, tedd wrote: R O B said: That Rod guy, he's such a card! I'd add something, but Jay has already covered my list in a more recent email than this one to which I'm responding :) jblanchard (who I think is Rod) said: A SQL question on a PHP mailing

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] Mysql Rows

2006-03-05 Thread Gustav Wiberg
- Original Message - From: tedd [EMAIL PROTECTED] To: php-general@lists.php.net Cc: Gustav Wiberg [EMAIL PROTECTED]; Robert Cummings [EMAIL PROTECTED] Sent: Sunday, March 05, 2006 12:58 AM Subject: Re: [PHP] Mysql Rows Hi: Gustav said: No, maybe not when it's a small db, but when

Re: [PHP] Mysql Rows

2006-03-04 Thread Miles Thompson
I hope the following will be helpful, and it is a bit of a rant .. rant The row number DOES NOT MATTER and is absolutely irrelevant. MySQL is a relational database from which information is gathered by means of comparing fields to key values. Even if you are using an auto-incremented primary

Re: [PHP] Mysql Rows

2006-03-04 Thread tedd
planetthoughtful wrote: But, too often I've seen people new to database design not liking 'gaps' because 'user1' will have a unique id of '1', while 'user2' will have a unique id of '6' because the records associated with unique ids '2' through '5' were deleted during testing, and so on.

Re: [PHP] Mysql Rows

2006-03-04 Thread Gustav Wiberg
- Original Message - From: tedd [EMAIL PROTECTED] To: php-general@lists.php.net Cc: benifactor [EMAIL PROTECTED]; Murray @ PlanetThoughtful [EMAIL PROTECTED]; Anthony Ettinger [EMAIL PROTECTED] Sent: Saturday, March 04, 2006 3:14 PM Subject: Re: [PHP] Mysql Rows planetthoughtful

Re: [PHP] Mysql Rows

2006-03-04 Thread Robert Cummings
On Sat, 2006-03-04 at 09:14, tedd wrote: planetthoughtful wrote: But, too often I've seen people new to database design not liking 'gaps' because 'user1' will have a unique id of '1', while 'user2' will have a unique id of '6' because the records associated with unique ids '2' through

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

2006-03-04 Thread Paul Jinks
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 anyone had any success with getting php/mysql

Re: [PHP] Mysql Rows

2006-03-04 Thread benifactor
: Re: [PHP] Mysql Rows On Sat, 2006-03-04 at 09:14, tedd wrote: planetthoughtful wrote: But, too often I've seen people new to database design not liking 'gaps' because 'user1' will have a unique id of '1', while 'user2' will have a unique id of '6' because the records associated

Re: [PHP] Mysql Rows

2006-03-04 Thread benifactor
: Re: [PHP] Mysql Rows - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: tedd [EMAIL PROTECTED] Cc: PHP-General php-general@lists.php.net; benifactor [EMAIL PROTECTED]; Murray @ PlanetThoughtful [EMAIL PROTECTED]; Anthony Ettinger [EMAIL PROTECTED] Sent: Saturday

Re: [PHP] Mysql Rows

2006-03-04 Thread tedd
Hi: Gustav said: No, maybe not when it's a small db, but when you try to delete 50.000 posts I have a strong feeling this would be very much slower then if you don't alter table after each deletion. First, I'm not deleting 50,000 records -- I dropping a table and renumbering it. In any

Re: [PHP] Mysql Rows

2006-03-04 Thread Robert Cummings
PROTECTED] Sent: Saturday, March 04, 2006 2:29 PM Subject: Re: [PHP] Mysql Rows - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: tedd [EMAIL PROTECTED] Cc: PHP-General php-general@lists.php.net; benifactor [EMAIL PROTECTED]; Murray @ PlanetThoughtful [EMAIL

RE: [PHP] Mysql Rows

2006-03-04 Thread jblanchard
[snip] my reasoning for needing the users number in a database is this... i am going to be doing a lottery type thing where i grab a random number between 1 and the result of mysql_num_rows($result)... that is the reason the gaps matter. the while loop didn't work for me so if anyone could help

Re: [PHP] Mysql Rows

2006-03-04 Thread Robert Cummings
On Sat, 2006-03-04 at 18:58, tedd wrote: Hi: Rod said: *LOL* I knew those MySQL people shouldn't have made the ALTER TABLE syntax available to just anyone. Gun -- foot -- *BLAM*. I hope to God you never get your hands on a real database with millions of entries. I'm glad that you were

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

[PHP] Mysql Rows

2006-03-03 Thread benifactor
i need to find a way to find out what number of a row is in a database... for example: //this is the database Username: Chuck Password: adsasa Username: jimmy Password: adsf Username: stewart Password: dfds the information i need is what row jimmy resides on.. this is what i tried: function

Re: [PHP] Mysql Rows

2006-03-03 Thread Anthony Ettinger
define $1 = 0 outside your loop. i'm curious why you are relying on row-order in the database? Typically you'd have a PRIMARY KEY auto_increment for something like this. On 3/3/06, benifactor [EMAIL PROTECTED] wrote: i need to find a way to find out what number of a row is in a database...

Re: [PHP] Mysql Rows

2006-03-03 Thread benifactor
Ettinger [EMAIL PROTECTED] To: benifactor [EMAIL PROTECTED] Cc: php php-general@lists.php.net Sent: Friday, March 03, 2006 3:52 PM Subject: Re: [PHP] Mysql Rows define $1 = 0 outside your loop. i'm curious why you are relying on row-order in the database? Typically you'd have a PRIMARY KEY

Re: [PHP] Mysql Rows

2006-03-03 Thread Murray @ PlanetThoughtful
it. - Original Message - From: Anthony Ettinger [EMAIL PROTECTED] To: benifactor [EMAIL PROTECTED] Cc: php php-general@lists.php.net Sent: Friday, March 03, 2006 3:52 PM Subject: Re: [PHP] Mysql Rows define $1 = 0 outside your loop. i'm curious why you are relying on row-order in the database

Re: [PHP] Mysql Rows

2006-03-03 Thread Anthony Ettinger
. thank you for you help. simple fix. i should have caught it. - Original Message - From: Anthony Ettinger [EMAIL PROTECTED] To: benifactor [EMAIL PROTECTED] Cc: php php-general@lists.php.net Sent: Friday, March 03, 2006 3:52 PM Subject: Re: [PHP] Mysql Rows define $1 = 0

Re: [PHP] Mysql Rows

2006-03-03 Thread Murray @ PlanetThoughtful
I have to agree with Anthony - why are you using row order to determine something relating to users? I couldn't follow your brief explanation above, and the fact that you're doing it sets off some soft alarm bells about the design of your application. Why is it important that there shouldn't be

Re: [PHP] Mysql Rows

2006-03-03 Thread Anthony Ettinger
On 3/3/06, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote: I have to agree with Anthony - why are you using row order to determine something relating to users? I couldn't follow your brief explanation above, and the fact that you're doing it sets off some soft alarm bells about the

Re: [PHP] Mysql Rows

2006-03-03 Thread Murray @ PlanetThoughtful
On 4/03/2006 5:36 PM, Anthony Ettinger wrote: Yep, that's one good reason among many for using unique ids. Thinking a little about the OP's question, I could understand row order being relevant in certain situations where you wanted to display something like, You were the

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-03-01 Thread Chris Lott
Thanks for the advice-- I've run Linux without a GUI for a long time, so I'm quite familiar with hand compilations-- but I always wondered if I was just missing something with packaging systems that it seemed to REQUIRE hand-compilation to get a workable development LAMP system. Anytime I tried

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-03-01 Thread John Meyer
Chris Lott wrote: Thanks for the advice-- I've run Linux without a GUI for a long time, so I'm quite familiar with hand compilations-- but I always wondered if I was just missing something with packaging systems that it seemed to REQUIRE hand-compilation to get a workable development LAMP

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-03-01 Thread Chris
system. Anytime I tried using packages some need seemed to force me back to doing it by hand. I guess it depends on what you are developing.. Most package systems have the extensions available but not installed by default (eg php-mysql, php-pgsql, php-imap etc). So I guess my more specific

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-27 Thread John Nichel
Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about Linux distributions are welcome as well! c

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-27 Thread David Tulloh
Curt Zirzow wrote: On Sat, Feb 25, 2006 at 01:41:06PM -0900, Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-27 Thread Curt Zirzow
On Tue, Feb 28, 2006 at 02:13:15AM +1100, David Tulloh wrote: Curt Zirzow wrote: Before I get into what distib to use there are a few things i'd like to point out: 1) Avoid using the packaging system the OS provides for the developement server. If you do, you will be under

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-26 Thread Curt Zirzow
On Sat, Feb 25, 2006 at 01:41:06PM -0900, Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about

[PHP] Re: Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-26 Thread Jens Kleikamp
Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about Linux distributions are welcome as well! c

[PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-25 Thread Chris Lott
I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about Linux distributions are welcome as well! c -- PHP General Mailing

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-25 Thread chris smith
On 2/26/06, Chris Lott [EMAIL PROTECTED] wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about Linux

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-25 Thread Ozz
On Sun, 26 Feb 2006 09:52:43 +1100, chris smith [EMAIL PROTECTED] wrote: Ubuntu or debian are good choices (ubuntu is kept more up to date, the debian-stable branch only gets updated with security releases between major versions). Having said that, Debian Sid is usually pretty

[PHP] mysql help..

2006-02-24 Thread ganu ullu
Hi all, I installed a opensource php project, and now is working fine for me. Now that project has some 40-50 MySQL tables.. now I want to change something in that but the I am not able to get the DB flow.. Is any body knows any tool by which we can create/make the relationship diagram like we

Re: [PHP] mysql help..

2006-02-24 Thread John Nichel
ganu ullu wrote: Hi all, I installed a opensource php project, and now is working fine for me. Now that project has some 40-50 MySQL tables.. now I want to change something in that but the I am not able to get the DB flow.. Is any body knows any tool by which we can create/make the

Re: [PHP] mysql help..

2006-02-24 Thread chris smith
Ask the open-source project for help. They will be able to answer your questions better than we can. On 2/25/06, ganu ullu [EMAIL PROTECTED] wrote: Hi all, I installed a opensource php project, and now is working fine for me. Now that project has some 40-50 MySQL tables.. now I want to

Re: [PHP] mysql help..

2006-02-24 Thread Tom Rogers
Hi, Saturday, February 25, 2006, 5:53:23 AM, you wrote: gu Hi all, gu I installed a opensource php project, and now is working fine for me. gu Now that project has some 40-50 MySQL tables.. gu now I want to change something in that but the I am not able to get the DB gu flow.. gu Is any body

[PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
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 to another table. The problem is the result

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
] PHP mysql data result set compression Hi David, From the comments on unbuffered_query: However, when using different db connections, it all works ofcource ... So create a second db connection and when you run the insert use that instead: $result2 = mysql_query(insert blah, $dbconnection_two

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.

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