PHP Warning: mysql_query(): MySQL server has gone away

2009-11-26 Thread René Fournier
: PHP Warning: mysql_query(): MySQL server has gone away However, the same query executes fine when run at the mysql command prompt, or from within Sequel Pro -- can execute it with a LIMIT clause of 2 million. So, it appears I'm exhausting some MySQL limit or system resource, but before I

Re: success return from mysql_query() when error return was expected

2009-04-09 Thread Thomas Spahni
On Wed, 8 Apr 2009, Pete Wilson wrote: Hi everyone -- I'm a MySQL noob. I have MySQL queries in my C code and I was surprised to find I'm getting a success return from: mysql_query(pmysql, select * from usrs where(usr=\illegal name\); In this table called usrs, usr is the primary key

success return from mysql_query() when error return was expected

2009-04-08 Thread Pete Wilson
Hi everyone -- I'm a MySQL noob. I have MySQL queries in my C code and I was surprised to find I'm getting a success return from: mysql_query(pmysql, select * from usrs where(usr=\illegal name\); In this table called usrs, usr is the primary key and the engine is myisam. I expected

Fw: Weird problem with mysql_query

2008-09-10 Thread DaWiz
- Original Message - From: Darryle Steplight [EMAIL PROTECTED] To: MySql [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, September 09, 2008 6:59 PM Subject: Re: Weird problem with mysql_query Hi G, There is nothing weird about your results. When you do a Count

Re: Weird problem with mysql_query

2008-09-10 Thread Andy Shellam
for. On Tue, Sep 9, 2008 at 6:06 PM, MySql [EMAIL PROTECTED] wrote: We are running MySql version 5.0.45-Debian_1ubuntu3.1-log Debian etch distribution under Ubuntu. If I submit the following query via mysql_query it acts as if the where is not there: select count(*) as 'Count' from logins

Weird problem with mysql_query

2008-09-09 Thread MySql
We are running MySql version 5.0.45-Debian_1ubuntu3.1-log Debian etch distribution under Ubuntu. If I submit the following query via mysql_query it acts as if the where is not there: select count(*) as 'Count' from logins where player = 'aqwert'; this returns: Count 143578160 Submitting

Re: Weird problem with mysql_query

2008-09-09 Thread Darryle Steplight
5.0.45-Debian_1ubuntu3.1-log Debian etch distribution under Ubuntu. If I submit the following query via mysql_query it acts as if the where is not there: select count(*) as 'Count' from logins where player = 'aqwert'; this returns: Count 143578160 Submitting the same query at a MySql

it doesn't return from the mysql_query processing

2007-07-18 Thread Koki Takeda
), it transmits repeating MySQL query (select,insert) according to MySQL function mysql_query. And, test.php forking does the process, and operates at the same time five child processes. MySQL query is transmitted about 2500 times in all child process total. I will explain the outline

Re: it doesn't return from the mysql_query processing

2007-07-18 Thread Bill Newton
(Solaris 8) php: 4.3.9 Mysql: Ver 4.0.12-standard for sun-solaris2.8 on sparc ■ Content of processing In the made php program (A temporary name: test.php), it transmits repeating MySQL query (select,insert) according to MySQL function mysql_query. And, test.php forking does

mysql_query gives Resource id #3 error

2006-03-11 Thread fbsd_user
$sql = SELECT logon_id FROM members WHERE logon_id = '$logonid' AND logon_pw = '$logonpw'; $result = mysql_query($sql) or die('Query failed. ' . mysql_error()); print $result; shows Resource id #3 Where can I find meaning for what

Re: mysql_query gives Resource id #3 error

2006-03-11 Thread Pat Adams
On Sat, 2006-03-11 at 12:53 -0500, fbsd_user wrote: $sql = SELECT logon_id FROM members WHERE logon_id = '$logonid' AND logon_pw = '$logonpw'; $result = mysql_query($sql) or die('Query failed. ' . mysql_error()); print $result; shows

RE: mysql_query gives Resource id #3 error

2006-03-11 Thread Logan, David (SST - Adelaide)
--- -Original Message- From: Pat Adams [mailto:[EMAIL PROTECTED] Sent: Sunday, 12 March 2006 4:45 PM To: Mysql Subject: Re: mysql_query gives Resource id #3 error On Sat, 2006-03-11 at 12:53 -0500, fbsd_user wrote: $sql = SELECT

difference mysql_query and mysql_real_query

2005-08-05 Thread Afivi Andri S
need help... what is the different between mysql_query and mysql_real_query, is it about speed or stable? and how to use mysql_use_result ?

Re: difference mysql_query and mysql_real_query

2005-08-05 Thread Philippe Poelvoorde
Afivi Andri S wrote: need help... what is the different between mysql_query and mysql_real_query, is it about speed or stable? header are int mysql_query(MYSQL *mysql, const char *query) int mysql_real_query(MYSQL *mysql, const char *query, unsigned long length) and mysql_query is in fact

mysql_query Looping

2005-04-08 Thread Celebrity Institute
Hi, just got intro to the list and i hope I can find some help here. I'm trying to figure out the true syntax of a project im working on, basicly theirs a menu on my site that has several catagoies and in those catagories are secondary, and some times 3rd level and 4th level sub lists, i want

RE: mysql_query Looping

2005-04-08 Thread gunmuse
PROTECTED] Sent: Friday, April 08, 2005 1:32 PM To: mysql@lists.mysql.com Subject: mysql_query Looping Hi, just got intro to the list and i hope I can find some help here. I'm trying to figure out the true syntax of a project im working on, basicly theirs a menu on my site that has several catagoies

mysql_query() crashes for certain statement

2005-02-27 Thread Eric Lilja
Hello, I'm using MySQL 4.1.10 on Windows XP Pro SP2 (+ all patches on windowsupdate). I'm using the MySQL C api in a program compiled with MSVC++ 7.1. My program crashes when I call mysql_query() with the following string: SELECT * FROM my_recipes WHERE enum_col=0 Yes, the MYSQL object is valid

Re: mysql_query() crashes for certain statement

2005-02-27 Thread Eric Lilja
Eric Lilja wrote: Hello, I'm using MySQL 4.1.10 on Windows XP Pro SP2 (+ all patches on windowsupdate). I'm using the MySQL C api in a program compiled with MSVC++ 7.1. My program crashes when I call mysql_query() with the following string: SELECT * FROM my_recipes WHERE enum_col=0 Yes

c api mysql_query to insert into a column of type datetime.....

2004-06-01 Thread Bono, Saroj AA R62
I am using mysql_query to insert into a column which is of type datetime. My variable is stored in a char string. I need to put it into the query in a way that it can be inserted: myDate = 98-12-12.this is what I have. sprintf (myquery, '%what here? ', myDate

Re: query to see if db exists...........mysql_query( myQuery)

2004-05-28 Thread Stephen E. Bacher
On Thu, May 27, 2004 at 03:59:46PM -0400, Bono, Saroj AA R62 wrote: I am going to use mysql_query() and want to find out if a certain database exists. If mysql_real_connect() fails there are many errors that could account for this. The database may exist , and I cant take the error returned

about mysql_query()

2004-05-27 Thread HSY
In C API, after running mysql_query(), I want to stop this query by mysql_kill(). But I can not get the specific process (query) ID. How could I solve this problem? mysql_list_processes() return a list of all processes (quries) running on the server. But it is possible that different user may

query to see if db exists...........mysql_query( myQuery)

2004-05-27 Thread Bono, Saroj AA R62
I am going to use mysql_query() and want to find out if a certain database exists. If mysql_real_connect() fails there are many errors that could account for this. The database may exist , and I cant take the error returned from the failed query to mean the db isnt there and should be created

Re: query to see if db exists...........mysql_query( myQuery)

2004-05-27 Thread Jim Winstead
On Thu, May 27, 2004 at 03:59:46PM -0400, Bono, Saroj AA R62 wrote: I am going to use mysql_query() and want to find out if a certain database exists. If mysql_real_connect() fails there are many errors that could account for this. The database may exist , and I cant take the error returned

mysql_query memory

2004-03-10 Thread Melanie Ware
the datbase should be checked for a prior entry. This works successfully for the first 3 entries. The 4th. entry executes the SELECT statement but appears to wipe the structure contents The code is as follows. select_query = SELECT file_id FROM File WHERE file_name = 'RPCMap.h'; mysql_query (conn

Re: mysql_query memory

2004-03-10 Thread Sasha Pachev
'; mysql_query (conn, select_query); I know that the line containing the mysql_query statement destroys the struture data content because I have used gdb to print the structure values as I step through the code. The results you are seeing are more likely a gdb peculiarity. To verify, try

Re: mysql_query to return immediately when connection lost

2003-03-26 Thread Pedro Alvarez-Tabío
Hi, I also tried that but the same result, mysql_ping doesn't return immediately. Any other hint please? Thank you very much. Pedro Gelu Gogancea wrote: Hi, In this case i guess is better to execute mysql_ping() before mysql_query(). Regards, Gelu

mysql_query to return immediately when connection lost

2003-03-25 Thread Pedro Alvarez-Tabío
Hello, My client uses mysql_query to access a remote server. When the connection is lost (cable disconnected), mysql_query doesn't return immediately and I need a fast error return. I have tried executing mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, connectTimeout); (connectTimeout=1), always

Re: mysql_query to return immediately when connection lost

2003-03-25 Thread Gelu Gogancea
] - Original Message - From: Pedro Alvarez-Tabío [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 1:47 PM Subject: mysql_query to return immediately when connection lost Hello, My client uses mysql_query to access a remote server. When the connection is lost (cable

Re: mysql_query to return immediately when connection lost

2003-03-25 Thread Pedro Alvarez-Tabío
Hi, In this case I do have a DNS server. Any other hint please? I strongly need mysql_query to return immediately if connection is lost with the server. Any configuration parameter or similar on MySQL? Need to reconfigure something in the OS? Thanks. Pedro Gelu Gogancea wrote: Hi

Re: mysql_query to return immediately when connection lost

2003-03-25 Thread Gelu Gogancea
Hi, In this case i guess is better to execute mysql_ping() before mysql_query(). Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original

mysql_query sort

2002-11-29 Thread Wolfgang Gliese
Hallo, I want to sort my array (example: array[Ortslage, Strasse, Weg]) comming from a query. Following script shows Warning: sort() expects parameter 1 to be array, resource given in .../formular.php on line 36 var_dump($query) shows: resource(6) of type (mysql result) How should I do this?

Re: mysql_query sort

2002-11-29 Thread Roger Baklund
* Wolfgang Gliese I want to sort my array (example: array[Ortslage, Strasse, Weg]) comming from a query. A mysql query returns a 'resultset', not an 'array'. In PHP you can transform the resultset to an array, and this array can be sorted using a PHP function. However, this is a mysql list, and

multiple mysql query in PHP mysql_query?

2002-11-08 Thread Qunfeng Dong
Hi, Can anybody give me a simple example of using PHP's mysql_query to perform mulitple mysql queries. I am using MySQl 3.23, trying to use create temporary table and insert ... select to overcome the lack of union operation in that verion of MySQL. Thanks!Qunfeng Dong

Re: multiple mysql query in PHP mysql_query?

2002-11-08 Thread Paul DuBois
At 13:30 -0800 11/8/02, Qunfeng Dong wrote: Hi, Can anybody give me a simple example of using PHP's mysql_query to perform mulitple mysql queries. I If you mean an example of a single call to mysql_query() that performs multiple queries, no one will be able to show you an example. It doesn't

mysql_query

2002-09-24 Thread Mario Ohnewald
Hello! I am a bloody newbie in this whole mysql area, so please forgive me for such a silly question ;) I have expected to get the text from the field with this code. $result=MYSQL_QUERY( SELECT mail_1 FROM table_mail WHERE rechner_nr='Rechner1'); echo $result; As result i get: Resource id #2

RE: mysql_query

2002-09-24 Thread Mario Ohnewald
:[EMAIL PROTECTED]] Sent: dinsdag 24 september 2002 09:50 To: [EMAIL PROTECTED] Subject: mysql_query Hello! I am a bloody newbie in this whole mysql area, so please forgive me for such a silly question ;) I have expected to get the text from the field with this code. $result=MYSQL_QUERY

mysql_query() oddities if remote database becomes available

2002-07-19 Thread equ
Description: This is a resend or actually a reformatted bug report since the first one I sent out contained a error on my part (I incorrectly looked at the mysql_query() return code although I should be looking at mysql_errno(). Now that is fixed but the problem remains. If the remote database

mysql_query() hangs if remote database becomes unavailable

2002-07-18 Thread equ
, issuing a mysql_query() when the remote database has become unavailable (due to routing problems, physical cabling, firewall filtering, etc) will cause the execution to remain in mysql_query() for a undetermined amount of time. Strace'ing shows the process trying to read() from the MySQL socket (here

(php thing) Bug #17126 Updated: mysql_pconnect() and mysql_query(LOCKTABLES...) (fwd)

2002-05-10 Thread Stian Skjelstad
() and mysql_query(LOCK TABLES...) ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=17126edit=2 ID: 17126 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status

Re: [PHP] mysql_query() problem

2001-12-16 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

2001-12-16 Thread Brian Rue
Thanks... mysql_error() said No database selected. Oops... forgot to define $db_name as a global. - Original Message - From: Girish Nath [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Brian Rue [EMAIL PROTECTED] Sent: Sunday, December 16, 2001 8:17 PM Subject: Re: [PHP] mysql_query() problem

Re: How to send multiple SQL statements using C API mysql_query?

2001-11-22 Thread Gordon Burditt
I would like to send multiple SQL statements using the C API mysql_query. I have a large string with 20 SQL statements. When I call mysql_query with that string, only the first one is processed. Is there a way to do what I'm doing without separating the statements into individual calls

How to send multiple SQL statements using C API mysql_query?

2001-11-20 Thread Anna Winkler
Hi, I would like to send multiple SQL statements using the C API mysql_query. I have a large string with 20 SQL statements. When I call mysql_query with that string, only the first one is processed. Is there a way to do what I'm doing without separating the statements into individual calls

Re: How to send multiple SQL statements using C API mysql_query?

2001-11-20 Thread Attila Beno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, On Tue, 20 Nov 2001, Anna Winkler wrote: I would like to send multiple SQL statements using the C API mysql_query. I have a large string with 20 SQL statements. When I call mysql_query with that string, only the first one is processed

Re: C API mysql_query() malfunctioning (long)

2001-11-12 Thread M. A. Alves
So you mean to replace joining with combined condition? I think it is simply a terminological/syntactical difference. I simply never use LEFT JOIN commands. I always use '='. I think they do the same think, namely what is called a join in relational _theory_. I *understand* '=' better then

Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread M. A. Alves
I know KR (section 4.9, 2nd ed.) says char s[] = ...; is equivalent to char s[] = { . . . , '\0'} but I always explicitely attach the \0 just to be sure i.e. char s[] = ...\0; /* mysql, database (cheating the filter, human reader ignore) */ -- , M A R I O data miner, LIACC,

Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread brainheap
M. A. Alves wrote: My testing returns 16 rows in both ways (program using API vs. mysql monitor). I have copied verbatim the query string from your C code (it was the query constant right?) I think this contrasts with your results no? yes when I typed in the same query in mysql I get

Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread brainheap
M. A. Alves wrote: I think the problem is in your query expression. I have reformulated your original query using my style and that consistently results in 4 rows which I think is what you wanted. Original_Query : String := select distinct Exhibition.InternalNumber,Exhibition.Name,

Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread brainheap
M. A. Alves wrote: I think the problem is in your query expression. you're absolutely right here I have reformulated your original query using my style and that consistently results in 4 rows which I think is what you wanted. Original_Query : String := select distinct

Seg faults with mysql_query mysql_ping using libmysqld

2001-10-26 Thread greg . kurzawa . b
Hello, I am experiencing seg faults in seemingly innocent code with MySQL version 4.0.0 and the embedded library, libmysqld. The fault only happens when calling particular functions, specifically mysql_ping() and mysql_query(). There might be others, but these are the only ones I've found so

Re: Seg faults with mysql_query mysql_ping using libmysqld

2001-10-26 Thread Sergei Golubchik
Hi! On Oct 26, [EMAIL PROTECTED] wrote: Hello, I am experiencing seg faults in seemingly innocent code with MySQL version 4.0.0 and the embedded library, libmysqld. The fault only happens when calling particular functions, specifically mysql_ping() and mysql_query(). There might

Re: Seg faults with mysql_query mysql_ping using libmysqld

2001-10-26 Thread Sasha Pachev
On Friday 26 October 2001 11:12, [EMAIL PROTECTED] wrote: Hello, I am experiencing seg faults in seemingly innocent code with MySQL version 4.0.0 and the embedded library, libmysqld. The fault only happens when calling particular functions, specifically mysql_ping() and mysql_query

Re: Cannot do mysql_query INSERT on Field type varchar that contains

2001-09-04 Thread Sinisa Milivojevic
nothing at all...no error message of any kind. How-To-Repeat: mysql_query(INSERT INTO reply (subj,message) VALUES('$subj','$message')); where subj is defined as varchar(50) and message is defined as mediumtext Set the value

Re: Is mysql_query() reentrant ?

2001-09-02 Thread Sinisa Milivojevic
Marc A. Mueller writes: Hi, I want my application (LINUX, C++) to send periodically an information to a MySQL-Server, regardless of whats it is actually doing at the moment. Can I use the alarm signal for this (is mysql_query() signal-reentrant) ? I'm using the normal mysql-library

Is mysql_query() reentrant ?

2001-09-01 Thread Marc A. Mueller
Hi, I want my application (LINUX, C++) to send periodically an information to a MySQL-Server, regardless of whats it is actually doing at the moment. Can I use the alarm signal for this (is mysql_query() signal-reentrant) ? I'm using the normal mysql-library, not mysql++. Versions should

HELP: C API: mysql_query INSERT not working...

2001-06-28 Thread James Gosnell
(connection)) printf(%s\n, mysql_stat(mysql)); if ((mysql_query(connection, insert into customer (last_name,first_name,middle_name,address,city,state,zip,home_phone) VALUES ('Gosnell','James','Matthew','1008 Rhoads Hall','Terre Haute','IN','47809','812-237-7094' mysql_error(connection

Re: HELP: C API: mysql_query INSERT not working...

2001-06-28 Thread Sinisa Milivojevic
James Gosnell writes: I'm not getting any errors at all and the program runs just fine, except that it's not inserting! :) selects work and everything else. Am I missing a function or structure? Thanks... James Gosnell [EMAIL PROTECTED]#include stdio.h #include mysql/mysql.h #include

problem with mysql_query in C API

2001-06-18 Thread Kenneth Johansen
hi all, i have a small problem im using mysql_query to access my mysql database. now then, i have 2 queries, 1 just after the other. the first one goes ok, the second one never does. doesnt matter if i switch the queries, the one that is last never works. if i write the query in an xterm

Re: problem with mysql_query in C API

2001-06-18 Thread Ed Carp
Kenneth Johansen ([EMAIL PROTECTED]) writes: hi all, i have a small problem im using mysql_query to access my mysql database. now then, i have 2 queries, 1 just after the other. the first one goes ok, the second one never does. doesnt matter if i switch the queries, the one