Hi,
Currently, my program creates a new MYSQL object each time a connection
is needed to save or load information from my MySQL database.
Sometimes, this connection is created 10,000 or more times during one
use of the program. I'm wondering if I reuse the connection (have a
static MYSQL
;
mysql_init (mysql);
mysql_real_connect(mysql, host, user, password, dbase, 0, 0, 0);
-=| Ben
- Original Message -
From: Anna Fowles-Winkler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 2:58 PM
Subject: Does mysql_real_connect allocate memory?
Hi
Hi,
Does the MySQL C API function mysql_real connect allocate memory or do I
need to do it? This is what my code currently does:
MYSQL *mysql;
mysql = new MYSQL
mysql_init(mysql);
mysql_real_connect(mysql, host, user, password, dbase, 0, 0, 0);
Thanks,
Anna
Gerald Clark wrote:
The semicolon does not belong there.
Where? At the end of the query or in the string?
--Anna
Anna Fowles-Winkler wrote:
Anna Fowles-Winkler wrote:
Paul DuBois wrote:
Paul DuBois wrote:
At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote:
Well, the function
, allow_1, allow_2,
allow_3, allow_4, allow_5, allow_6)
VALUES ('Eye Movement
Time',1,NULL,'per',0,'.1;',0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,0,0,1)
Paul DuBois wrote:
At 8:37 -0600 4/29/02, Anna Fowles-Winkler wrote
Hi,
I have an insert command that I'm executing through the C API function
mysql_real_query. One of my values is a string like this:
'1;'
When mysql_real_query sees the ;, it thinks it's the end of the
statement. How can I prevent that from happening? Is there a way to
escape it?
Thanks
Well, the function is called like this:
mysql_real_query( mysql_connection, query_string, strlen( query_string ));
Wouldn't that pass the correct length?
--Anna
Paul DuBois wrote:
At 14:03 -0600 4/26/02, Anna Fowles-Winkler wrote:
Hi,
I have an insert command that I'm executing through
Paul DuBois wrote:
At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote:
Well, the function is called like this:
mysql_real_query( mysql_connection, query_string, strlen( query_string ));
Wouldn't that pass the correct length?
Not necessarily.
Uhm... why not? Wouldn't strlen return
Paul DuBois wrote:
Paul DuBois wrote:
At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote:
Well, the function is called like this:
mysql_real_query( mysql_connection, query_string, strlen( query_string ));
Wouldn't that pass the correct length?
Not necessarily.
Uhm
Anna Fowles-Winkler wrote:
Paul DuBois wrote:
Paul DuBois wrote:
At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote:
Well, the function is called like this:
mysql_real_query( mysql_connection, query_string, strlen( query_string ));
Wouldn't that pass the correct
10 matches
Mail list logo