Re: [PHP] mysql_query blocking

2009-06-28 Thread Lester Caine
Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? Daniel I can understand

Re: [PHP] mysql_query blocking

2009-06-28 Thread Tom Worster
On 6/27/09 7:09 PM, Daniel Kolbo kolb0...@umn.edu wrote: Tom Worster wrote: On 6/27/09 3:15 PM, Daniel Kolbo kolb0...@umn.edu wrote: When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is

Re: [PHP] mysql_query blocking

2009-06-27 Thread Ashley Sheridan
On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a

Re: [PHP] mysql_query blocking

2009-06-27 Thread Daniel Kolbo
Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? The php.ini

Re: [PHP] mysql_query blocking

2009-06-27 Thread Daniel Kolbo
Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from

Re: [PHP] mysql_query blocking

2009-06-27 Thread Ashley Sheridan
On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the

Re: [PHP] mysql_query blocking

2009-06-27 Thread Daniel Kolbo
Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL

Re: [PHP] mysql_query blocking

2009-06-27 Thread Tom Worster
On 6/27/09 3:15 PM, Daniel Kolbo kolb0...@umn.edu wrote: When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time

Re: [PHP] mysql_query blocking

2009-06-27 Thread Bastien Koert
Why issue/do a lock at all? Shouldn't need a large lock at read bastien On Saturday, June 27, 2009, Daniel Kolbo kolb0...@umn.edu wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote:

Re: [PHP] mysql_query blocking

2009-06-27 Thread Bastien Koert
On Saturday, June 27, 2009, Bastien Koert phps...@gmail.com wrote: Why issue/do a lock at all? Shouldn't need a large lock at read bastien On Saturday, June 27, 2009, Daniel Kolbo kolb0...@umn.edu wrote Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote:

Re: [PHP] mysql_query blocking

2009-06-27 Thread Phpster
Bastien Sent from my iPod On Jun 27, 2009, at 4:13 PM, Daniel Kolbo kolb0...@umn.edu wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a

Re: [PHP] mysql_query blocking

2009-06-27 Thread Daniel Kolbo
Tom Worster wrote: On 6/27/09 3:15 PM, Daniel Kolbo kolb0...@umn.edu wrote: When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging

Re: [PHP] mysql_query blocking

2009-06-27 Thread Daniel Kolbo
Bastien Koert wrote: Why issue/do a lock at all? Shouldn't need a large lock at read bastien On Saturday, June 27, 2009, Daniel Kolbo kolb0...@umn.edu wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15

Re: [PHP] mysql_query blocking

2009-06-27 Thread Daniel Kolbo
Phpster wrote: Bastien Sent from my iPod On Jun 27, 2009, at 4:13 PM, Daniel Kolbo kolb0...@umn.edu wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a

Re: [PHP] mysql_query blocking

2009-06-27 Thread Phpster
On Jun 27, 2009, at 7:17 PM, Daniel Kolbo kolb0...@umn.edu wrote: Phpster wrote: Bastien Sent from my iPod On Jun 27, 2009, at 4:13 PM, Daniel Kolbo kolb0...@umn.edu wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat,

Re: [PHP] mysql_query takes long time...

2009-05-31 Thread Phpster
You can also stack the queries to run multiple rows in one insert Insert into table values (row1col1, row1col2,'row1col3'), (row2col1,row2col2,'row2col3'),...(rowNcol1,rowNcol2,'rowNcol3') Bastien Sent from my iPod On May 31, 2009, at 8:18, דניאל דנון danondan...@gmail.com wrote: I've a

Re: [PHP] mysql_query and my.cnf?

2009-01-20 Thread Richard Heyes
... Hi, You might get more help on the MySQL list. -- Richard Heyes HTML5 Graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated January 17th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_query and my.cnf?

2009-01-20 Thread Jan G.B.
2009/1/20 Waynn Lue waynn...@gmail.com: Hey guys, I've been noticing that large queries cause a connection lost to mysql server problem, so I'm trying to figure out what settings I need to tweak in my my.cnf file to get it to work. Have you had a look on your (mysql) Logfiles and/or are you

Re: [PHP] mysql_query and my.cnf?

2009-01-20 Thread Ashley Sheridan
On Tue, 2009-01-20 at 17:51 +0100, Jan G.B. wrote: 2009/1/20 Waynn Lue waynn...@gmail.com: Hey guys, I've been noticing that large queries cause a connection lost to mysql server problem, so I'm trying to figure out what settings I need to tweak in my my.cnf file to get it to work.

RE: [PHP] mysql_query() vs query_database()

2008-10-01 Thread Jay Blanchard
[snip] RE: mysql_query() vs query_database() What is the differences between mysql_query and query_database? Are both compatible with PHP 5 and MySQL 5? Is one faster than the other? [/snip] query_database appears to be someone's function for generic database queries and is not a part of the

RE: [PHP] mysql_query won't work!!!

2004-04-15 Thread Jay Blanchard
[snip] ok, this same query, works EVERYWHERE ELSE, why won't it work now? it returns to me: Warning: Supplied argument is not a valid MySQL result resource $query_result = mysql_query(SELECT * FROM AotH_Users); while ($row = mysql_fetch_array($query_result, MYSQL_NUM)){ [/snip] When are you

Re: [PHP] mysql_query won't work!!!

2004-04-15 Thread John Nichel
Jeff Ostapchuk wrote: ok, this same query, works EVERYWHERE ELSE, why won't it work now? it returns to me: Warning: Supplied argument is not a valid MySQL result resource $query_result = mysql_query(SELECT * FROM AotH_Users); while ($row = mysql_fetch_array($query_result, MYSQL_NUM)){ Why don't

Re: [PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Richard Harb
Tuesday, April 6, 2004, 1:21:52 AM, you wrote: hi... i cant cut and paste my exact mysql query because it takes the '' stuff out doubles the $'s and the ,'s in the whole thing (dont know why but anyways...)... i have a query that goes something like this: mysql_query(insert into

Re: [PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Jochem Maas
user curly braces around your arrays in the string e.g: $sql = INSERT INTO x VALUES ({$_SESSION['add']['name']} ; oh, and unless add name are actually constants you should always wrap them in single quotes. (php will covert the non-exstent constant into a string a issue an E_NOTICE + its

Re: [PHP] mysql_query not returning true on innodb

2003-09-15 Thread daniel
i am doing a straight mysql_query without an autocommit=0 should i be doing an autocommit=0 if i am doing a read ? Hi there i have a random issue where mysql_query is not returning true sometimes on an innodb table which will trigger a custom error, this happens randomly if i go back to that

Re: [PHP] mysql_query

2003-07-06 Thread Sævar Öfjörð
SELECT * FROM my_table WHERE var1='$var1' AND var2='$var2' --^ you use AND -Original Message- From: Kevin Fradkin [mailto:[EMAIL PROTECTED] Sent: 6. júlí 2003 13:43 To: [EMAIL PROTECTED] Subject: [PHP] mysql_query hi... 1 question... how can i

RE: [PHP] mysql_query

2003-07-06 Thread Sævar Öfjörð
Hmm. Should have been like this.. -Original Message- From: Sævar Öfjörð [mailto:[EMAIL PROTECTED] Sent: 6. júlí 2003 14:04 To: [EMAIL PROTECTED] Subject: Re: [PHP] mysql_query SELECT * FROM my_table WHERE var1='$var1' AND var2='$var2' --^ you

Re: [PHP] mysql_query

2003-07-06 Thread Burhan Khalid
On Sunday, July 6, 2003, 7:26:06 PM, Kevin wrote: KF and now.. if in one cell i have for example... John Matheus KF when i do the query i have to put exactly john matheus to find it... KF is there any way to just write jo and search in every cell that contains KF those words? try this SELECT *

Re: [PHP] mysql_query

2003-07-06 Thread Kevin Fradkin
the problem is if i put 821000 i will have as result all number 821000 including 83 and i only need numbers begining with the numbers i entered.. i will try now the other thing!.. thnx! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] mysql_query

2003-07-06 Thread Chris Knipe
- Original Message - From: Kevin Fradkin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 06, 2003 6:40 PM Subject: Re: [PHP] mysql_query the problem is if i put 821000 i will have as result all number 821000 including 83 and i only need numbers begining

Re: [PHP] mysql_query

2003-07-06 Thread Kevin Fradkin
Thnx! :) one last question for the day... if in one cell i have two names. ex 'mary eleanor' and i want to search by typing 'ele' with name LIKE '$name%' will not give me mary eleanor as a result... any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] mysql_query

2003-07-06 Thread Chris Knipe
one last question for the day... if in one cell i have two names. ex 'mary eleanor' and i want to search by typing 'ele' with name LIKE '$name%' will not give me mary eleanor as a result... any ideas? *sighs* LIKE '%$name%' As I said... Read the MySQL Manual. -- PHP General

Re: [PHP] mysql_query maximum size

2002-11-04 Thread 1LT John W. Holmes
Just wondering if there is a maximum size to the sql that can be passed as a mysql_query, either from mysql itself or from the php side of things? I ask only cause I have a limiting clause on my select and I have no idea how big it will grow and I would prefer to write it in such a way that I

RE: [PHP] mysql_query() ERROR

2002-08-21 Thread Jay Blanchard
[snip] This is a query that I am sending to mysql. The problem is that sometimes in the variable $message characters like ) will get posted and when they do it makes mysql die. I can only assume that mysql thinks that the ) in the $message variable is meant to close the sql query, but I am having

Re: [PHP] mysql_query: how to uniquely identify the query???

2002-03-05 Thread hugh danaher
Simon, You can use the same name for your result as in: $query=SELECT * FROM table_name WHERE id='$variable'; $result=mysql_query($query); $array1=mysql_fetch_array($result); $query=SELECT * FROM table_name WHERE name='$variable2'; $result=mysql_query($query);

Re: [PHP] mysql_query() problem

2001-12-17 Thread Girish Nath
Hi Try the following to find out what's happening : $result = mysql_query($query,$conn) or die (mysql_error()); Or try echo'ing $result to see what it contains. It should contain something like this if everything is working fine : Resource id #2 Regards Girish - Original Message -

Re: [PHP] mysql_query problem (more suggestions)

2001-07-17 Thread Alvin Tan
wrote: Jason, I have tried what yoiu suggested. result is the same. From: Jason Murray [EMAIL PROTECTED] Date: Tue, 17 Jul 2001 15:28:11 +1000 To: 'Brad Wright' [EMAIL PROTECTED], Alvin Tan [EMAIL PROTECTED], PHP General List [EMAIL PROTECTED] Subject: RE: [PHP] mysql_query problem (more

Re: [PHP] mysql_query problem (FINALLY FIXED !!!!!!!)

2001-07-17 Thread Brad Wright
: Christopher Allen [EMAIL PROTECTED] Date: Tue, 17 Jul 2001 09:11:05 -0500 To: Brad Wright [EMAIL PROTECTED] Subject: Re: [PHP] mysql_query problem (more suggestions) not right because this works in a live system: $query1 = SELECT * FROM zip_base WHERE '$zip1' = zip '$zip1' = CONCAT(SUBSTRING

Re: [PHP] mysql_query problem

2001-07-16 Thread Christopher Allen
$testResult = mysql_query(SELECT * FROM login_table where Pass = $query = select * from login_table where Pass=password('$password'); then echo $query to the screen and make sure you see what needs to be there. Also try mysql_error etc.. from the manual GL --ccma -- PHP General Mailing

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
('$password') will (...does, i just double checked) causes a Fatal Error 'Undefined Function'. Nice try tho :) From: Alvin Tan [EMAIL PROTECTED] Date: Tue, 17 Jul 2001 13:07:45 +0800 To: Brad Wright [EMAIL PROTECTED] Subject: Re: [PHP] mysql_query problem (more suggestions) Then, how about

RE: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Jason Murray
Unless i have actually defined a function 'password()', calling 'echo password('$password') will (...does, i just double checked) causes a Fatal Error 'Undefined Function'. Nice try tho :) the original mail said to echo $query, which will include some text in it that says

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
Jason, I have tried what yoiu suggested. result is the same. From: Jason Murray [EMAIL PROTECTED] Date: Tue, 17 Jul 2001 15:28:11 +1000 To: 'Brad Wright' [EMAIL PROTECTED], Alvin Tan [EMAIL PROTECTED], PHP General List [EMAIL PROTECTED] Subject: RE: [PHP] mysql_query problem (more