Re: [PHP] Re: php mysql problem

2006-05-02 Thread chris smith
On 5/2/06, Ross [EMAIL PROTECTED] 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. Why do you want to do that? There's no

Re: [PHP] Re: php mysql problem

2006-05-02 Thread T.Lensselink
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] Re: php mysql problem

2006-05-02 Thread Dave Goodchild
Exactly - I don't think you really understand how a relational database works. The ids are retained as they may relate to records in another table. Internal sorting order is of no relevance at the application level. I think you need to rethink your design a little. On 02/05/06, T.Lensselink

Re: [PHP] mysql and php

2006-04-14 Thread Rory Browne
Display the different ways in which you've seen php using mysql, and we'll see if any one of them is any more secure than another. Most Security issues can be left to MySQL and the MySQL API. A few pointers - Store parameters(username/password) outside the DocuementRoot. Put your server on local

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

2006-04-03 Thread tedd
chris said: Time. Opening a db connection is time consuming. There are many levels involved (making the connection, authentication, etc).. Even worse if the connection is over tcp/ip because that overhead comes in on top as well. I replied: Have you timed it? Maybe I'll do that tomorrow.

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

2006-04-03 Thread chris smith
On 4/3/06, tedd [EMAIL PROTECTED] wrote: chris said: Time. Opening a db connection is time consuming. There are many levels involved (making the connection, authentication, etc).. Even worse if the connection is over tcp/ip because that overhead comes in on top as well. I replied: Have

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

2006-04-03 Thread tedd
chris said: Just out of interest, could you re-run the test using persistent connections? change mysql_connect to mysql_pconnect.. In doing so, the overall results dropped from a tenth of a second difference between both methods to three-one-hundredths of a second difference. In other

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

2006-04-03 Thread Richard Lynch
On Mon, April 3, 2006 1:33 pm, tedd wrote: Just out of interest, could you re-run the test using persistent connections? change mysql_connect to mysql_pconnect.. In doing so, the overall results dropped from a tenth of a second difference between both methods to three-one-hundredths of a

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

2006-04-03 Thread Jasper Bryant-Greene
tedd wrote: chris said: Just out of interest, could you re-run the test using persistent connections? change mysql_connect to mysql_pconnect.. [snip] Thanks -- does the persistent connection thing hold the server up until released? How does that work? MySQL is threaded so will not be

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

2006-04-01 Thread tedd
I always close the connection right after my query -- force of habit. It's like leaving the toilet seat up, it's only going to get you into trouble. So you close it after every query and then re-open it later for the next query? I don't see that as a good idea. No, you

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

2006-04-01 Thread Jasper Bryant-Greene
tedd wrote: I always close the connection right after my query -- force of habit. It's like leaving the toilet seat up, it's only going to get you into trouble. So you close it after every query and then re-open it later for the next query? I don't see that as a good idea.

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

2006-04-01 Thread chris smith
On 4/2/06, tedd [EMAIL PROTECTED] wrote: I always close the connection right after my query -- force of habit. It's like leaving the toilet seat up, it's only going to get you into trouble. So you close it after every query and then re-open it later for the next

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

2006-04-01 Thread tedd
At 11:07 AM +1200 4/2/06, Jasper Bryant-Greene wrote: tedd wrote: I always close the connection right after my query -- force of habit. It's like leaving the toilet seat up, it's only going to get you into trouble. So you close it after every query and then re-open it later

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

2006-04-01 Thread tedd
Time. Opening a db connection is time consuming. There are many levels involved (making the connection, authentication, etc).. Even worse if the connection is over tcp/ip because that overhead comes in on top as well. Have you timed it? It would be interesting to actually run a script that

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

2006-04-01 Thread Robert Cummings
On Sat, 2006-04-01 at 20:15, tedd wrote: Time. Opening a db connection is time consuming. There are many levels involved (making the connection, authentication, etc).. Even worse if the connection is over tcp/ip because that overhead comes in on top as well. Have you timed it? It would

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

2006-04-01 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Sat, 2006-04-01 at 20:15, tedd wrote: It would be interesting to actually run a script that opens, retrieves, and inserts data -- let's say 50k times. What's the time difference between one open, 50k retrieves/inserts, and one close-- as compared 50k opens

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

2006-04-01 Thread Robert Cummings
On Sat, 2006-04-01 at 20:48, Jasper Bryant-Greene wrote: Yeah, e.g. I have a database objects layer that means I only write SQL in classes, everything else is just calling object methods. I create the database object at the start of every script but that doesn't necessarily open the

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

2006-04-01 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Sat, 2006-04-01 at 20:48, Jasper Bryant-Greene wrote: Yeah, e.g. I have a database objects layer that means I only write SQL in classes, everything else is just calling object methods. I create the database object at the start of every script but that doesn't

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

2006-04-01 Thread Robert Cummings
On Sat, 2006-04-01 at 21:39, Jasper Bryant-Greene wrote: Robert Cummings wrote: There's smart lazy programming, and sloppy lazy programming. I don't trust anything magical in PHP. Most of us are familiar with the magic quotes and global vars fiascos *LOL*. But hey, if you can squeeze a

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

2006-04-01 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Sat, 2006-04-01 at 21:39, Jasper Bryant-Greene wrote: Robert Cummings wrote: There's smart lazy programming, and sloppy lazy programming. I don't trust anything magical in PHP. Most of us are familiar with the magic quotes and global vars fiascos *LOL*. But hey, if

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

2006-04-01 Thread Robert Cummings
On Sat, 2006-04-01 at 21:57, Jasper Bryant-Greene wrote: Robert Cummings wrote: Of course, it wouldn't exactly be a rewrite to make it close the connection at the end of every script before PHP did, if I'm proven wrong and it one day is necessary. I'd only need to change the database

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

2006-04-01 Thread John Nichel
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. It's extremely

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.

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.

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
Mark skrev: 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 =

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,

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

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] 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] 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] Re: php / mysql / js search result question

2006-01-04 Thread Michelle Konzack
Am 2005-12-27 08:03:42, schrieb Dave Carrera: Hi List, User input is a so the list moves to first instance of a. User continues to input ap so the list moves to 2 Apple Customer and so on. This can only be done from a JavaScript. Thank you in advance Dave c Greetings Michelle --

Re: [PHP] MySQL update killed my login...

2006-01-03 Thread M
It seems the upgrade was from Mysql 4.0. PASSWORD() function changed between 4.0 and 4.1, it uses longer hashes now. You can still use OLD_PASSWORD() function instead. William Stokes wrote: Hello, My ISP updated their MySQL DB to 5.0.18 and that killed my login procedure which was OK

Re: [PHP] MySQL update killed my login...

2006-01-03 Thread William Stokes
Thanks! -W M [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] It seems the upgrade was from Mysql 4.0. PASSWORD() function changed between 4.0 and 4.1, it uses longer hashes now. You can still use OLD_PASSWORD() function instead. William Stokes wrote: Hello, My ISP updated

[PHP] Re: PHP MySQL

2006-01-03 Thread toylet
Here's one thought . ascii (97) is the letter a is it possible that the ascii (65) A was interpreted as lowercase thus creating a duplicate primary key? Or your DBMS doesn't make a distinction between upper or lower case. You are correct. I compiled mysql and php from source tar-ball.

[PHP] Re: PHP MySQL

2006-01-02 Thread Jerry Kita
Man-wai Chang wrote: A table with a column big5 char(2) not null primary key. $target-query(delete from canton); for ($ii=0; $ii256; $ii++) { for ($jj=0; $jj256; $jj++) { echo $ii ... $jj . \n; $query=insert into canton ( big5 ) values ( ' .

Re: [PHP] MySQL - PHP's configure failed with error

2005-12-19 Thread Curt Zirzow
On Mon, Dec 19, 2005 at 02:56:37PM -0500, Scott Fletcher wrote: I don't know what is the problem. I'm using the GNU GCC and GNU Biutils. --snip-- ./configure --with-mysqli=../../mysql/bin/mysql_config --with-apxs2=../../ap ache2/bin/apxs --with-unixODBC --with-openssl --with-curl

RE: [PHP] mysql select statement in php having three conditions

2005-12-16 Thread Jay Blanchard
[snip] can someone tell me how to do this: i have to retrive data from a mysql table let's sayTABLE . i have to check that the rows i retrive meet this condition: field1='$variable',field2 is false and field3 is also false. as you can see field2 and field3 are bool type. field1 is varchar. i

[PHP] Re: PHP/MySql noob falls at first hurdle

2005-12-09 Thread Brice
On 12/9/05, Paul Jinks [EMAIL PROTECTED] wrote: Hi all I've been asked to put simple database interactivity on an academic site. They want users to enter a few details of their projects so other researchers can search and compare funding etc. How difficult can that be, I thought I've

[PHP] Re: PHP/MySql noob falls at first hurdle

2005-12-09 Thread Brice
Are short tags disabled? Change this line... ?=$output_row[projTitle]?br / To... ?php echo ( $output_row[projTitle] ) ?br / This line seems to work : pResult of b?=$SQLquery ?/b/p -- Brice Favre http://pelmel.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: PHP/MySql noob falls at first hurdle

2005-12-09 Thread Paul Jinks
Brice wrote: Try to check the key of your result row with a print_r or a var_dump command. Brice Favre http://pelmel.org/ Like this? ?php while($ouput_row = mysql_fetch_array($result)) print_r($output_row); ? Apologies if this is pathetically wrong. Like I

RE: [PHP] Re: PHP/MySql noob falls at first hurdle

2005-12-09 Thread Dan Parry
PROTECTED] Sent: 09 December 2005 15:05 To: php-general@lists.php.net Subject: Re: [PHP] Re: PHP/MySql noob falls at first hurdle Brice wrote: Try to check the key of your result row with a print_r or a var_dump command. Brice Favre http://pelmel.org/ Like this? ?php

[PHP] Re: PHP/MySql noob falls at first hurdle

2005-12-09 Thread Brice
On 12/9/05, Paul Jinks [EMAIL PROTECTED] wrote: Brice wrote: Try to check the key of your result row with a print_r or a var_dump command. Brice Favre http://pelmel.org/ Like this? ?php while($ouput_row = mysql_fetch_array($result)) print_r($output_row);

Re: [PHP] MySQL C API

2005-11-18 Thread Curt Zirzow
On Fri, Nov 18, 2005 at 09:34:56AM -0500, Leonard Burton wrote: HI All, Does anyone on here use the MySQL C API? Would you mind if I asked you a few questions off the list? You might want to ask someone on a related mysql list. Curt. -- -- PHP General Mailing List (http://www.php.net/)

[PHP] Re: PHP MYSQL Dynamic Select Boxes: Please Help

2005-11-03 Thread James Benson
Try asking in a newsgroup or forum specific to javascript, that has nothing to do with PHP Adele Botes wrote: I have 2 tables: products table product_id (INT 11 AUTOINCRE PRI) product_name (VARCHAR 255) product_desc (VARCHAR 255) color table color_id (INT 11 AUTOINCRE PRI) color (VARCHAR

RE: [PHP] MySql connection error on win XP for script that works on Freebsd 5.3

2005-10-26 Thread Jay Blanchard
[snip] I have searched the mysql website and located an article which shows reference to this error indicating that the client may need to be upgraded but as I am using the mysql-5.0.13-rc-win32.zip package I am cautious about assuming that that is the actual cause. [/snip]

Re: [PHP] MySql connection error on win XP for script that works on Freebsd 5.3

2005-10-26 Thread Vizion
On Wednesday 26 October 2005 08:35, the author Jay Blanchard contributed to the dialogue on- RE: [PHP] MySql connection error on win XP for script that works on Freebsd 5.3: [snip] I have searched the mysql website and located an article which shows reference to this error indicating

RE: [PHP] mysql/php date functions..

2005-09-26 Thread Jim Moseby
-Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 11:12 AM To: php-general@lists.php.net Subject: [PHP] mysql/php date functions.. hi... can anybody point me to a good/basic tutorial (tested) for php/mysql date functions... basically,

Re: [PHP] mysql/php date functions..

2005-09-26 Thread Silvio Porcellana
Jim Moseby wrote: Hi Bruce! MySQL and PHP both have extensive built-in date functions that are clearly documented and extraordinarily easy to use. For the vast majority of situations, there is no need to manually write any custom date-handling code. The decision to use MySQL or PHP to

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
-Original Message- From: Silvio Porcellana [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 8:51 AM To: php-general@lists.php.net Subject: Re: [PHP] mysql/php date functions.. Jim Moseby wrote: Hi Bruce! MySQL and PHP both have extensive built-in date functions that are clearly

Re: [PHP] mysql/php date functions..

2005-09-26 Thread John Nichel
bruce wrote: how can i create a mysql sql statement to insert a php 'time()' into mysql? i've got the mysql var 't1, timestamp' but i can't figure out how to do an insert $q = time(); $sql = sprintf(insert into foo (id, ctime) values(%d, %???), $id, $q); can't figure out how to get this to

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
), it doesn't work... if i -- insert into foo (id, time) values (2, NOW()), it works!!... my question is why??? -bruce -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 11:00 AM To: php-general@lists.php.net Subject: Re: [PHP] mysql/php date

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
, September 26, 2005 11:00 AM To: php-general@lists.php.net Subject: Re: [PHP] mysql/php date functions.. bruce wrote: how can i create a mysql sql statement to insert a php 'time()' into mysql? i've got the mysql var 't1, timestamp' but i can't figure out how to do an insert $q = time

<    1   2   3   4   5   6   7   8   9   10   >