- Original Message -
From: Alex Schaft al...@quicksoftware.co.za
If I were to do a select count(*) from x where y prior to doing
select * from x where y to get a number of records, how would this impact
performance on the server itself? Would the first query be the one to
do the
On 2012/02/09 01:40 PM, Johan De Meersman wrote:
- Original Message -
From: Alex Schaftal...@quicksoftware.co.za
If I were to do a select count(*) from x where y prior to doing
select * from x where y to get a number of records, how would this impact
performance on the server itself?
- Original Message -
From: Alex Schaft al...@quicksoftware.co.za
From the user's perspective, they just need to know the process didn't
hang. The count() query is more for getting memory requirements upfront.
Can I handle it all, or do I need to break it down into pages?
Then just
You might get closer to what you want if you put your command in a text file
and run it from the command line.
On a Mac OS X, I put a similar command:
select count(*) from testTable;
into a small text file:
testCount.txt
and ran this command from the Terminal:
mysql -u username
* Dan Nelson dnel...@allantgroup.com [100514 21:38]:
You can't do it with one function call, but you can do it, since the MySQL
cli was able to print 16 in your example above, and it was written in C.
Take a look at mysql_store_result(), mysql_num_fields(),
mysql_field_count(),
* Bob Cole bobc...@earthlink.net [100515 06:58]:
You might get closer to what you want if you put your command in a text file
and run it from the command line.
On a Mac OS X, I put a similar command:
select count(*) from testTable;
into a small text file:
testCount.txt
and ran
In the last episode (May 14), Tim Johnson said:
I have MySQL version 5.0.84 on linux slackware 13.0 32-bit.
I am working with a relatively new API written in a programming language
with a small user base (newlisp). The newlisp API imports a number of C
API functions from the system MySQL
Hi Mike, all,
Mike Aubury wrote:
I'm probably being a bit stupid - but I'm trying to determine (in code) the
length of the string in the schema for a given table.
So - for example :
create table a (
blah char(20)
)
I want to return '20', but I'm
Basically - so I can display it in the same form as the orginal table..
Or - if you want the longer version
I work with an Opensource project called 'Aubit4GL' (its a clone of
Informix4GL - which allows you to write really nice screen based database
oriented programs + reports), see
Mike, all,
Mike Aubury wrote:
[[...]]
So - the next question is...
Is there anyway in code I can find the 'fiddle' factor (1,3,or now possibly
4)
that I need to use to divide by to get back to the character width specified
in the CREATE TABLE ?
In the information_schema database,
It works for me, I used your code:
Field =mycol Type=254 Length=20
so at least your code is fine, and the problem must be somewhere
else. I am using RH EL3.
cheers,
Doug
On 6 Oct 2008, at 19:52, Mike Aubury wrote:
I'm probably being a bit stupid - but I'm trying to determine (in
code)
Mike Aubury schrieb:
Excellent - this seems to be the issue - the show create table shows :
mysql show create table a\g
+---++
| Table | Create
Table
Excellent - this seems to be the issue - the show create table shows :
mysql show create table a\g
+---++
| Table | Create
Table
[EMAIL PROTECTED] (Mike Aubury) writes:
I'm probably being a bit stupid - but I'm trying to determine (in code) the
length of the string in the schema for a given table.
So - for example :
create table a (
blah char(20)
)
I want to return '20', but I'm
Michael wrote:
Has anyone successfully called the C API routines for MySQL from COBOL?
Dude, April 1 was, like, a month ago now.
You may have better luck finding an ODBC bridge for your COBOL
environment, which let you access MySQL indirectly.
--
MySQL General Mailing List
For list
Hello,
Did you try to convert the .lib file to a GCC .a library ? See
http://mingw.org/mingwfaq.shtml#faq-msvcdll
If reimp doesn't work, you can try pexports and dlltool. I have an old
batch file I used for older MySQL versions at
http://athanatos.free.fr/EXE/implib.bat
[EMAIL
Fábio Emilio Costa wrote:
I'm working in a project in C++ using MySQL C API (Win98/Dev-C++
4.9.9.8/MySQL DevPak/MySQL 4.1.13) and I want to know if it's possible
to setup the server environment language (--language) via
mysql_options() function.
It seems that you are actually asking whether
Answer is simple. Can't do that.
- Original Message -
From: [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, May 06, 2005 5:40 AM
Subject: C API : Problem using multi-statements
Hello,
I have some problems using multiple queries in a databased driven project,
therefore I wrote
Jeremiah
I don't use the client library in my work but this should work from 4.1 on.
-Reggie
-Original Message-
From: Jeremiah Gowdy [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 11:19 AM
To: [EMAIL PROTECTED]; mysql@lists.mysql.com
Subject: Re: C API : Problem using
: Re: C API : Problem using multi-statements
Answer is simple. Can't do that.
- Original Message -
From: [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, May 06, 2005 5:40 AM
Subject: C API : Problem using multi-statements
Hello,
I have some problems using multiple queries
doh! need another redbull. :)
- Original Message -
From: Reggie Burnett [EMAIL PROTECTED]
To: 'Jeremiah Gowdy' [EMAIL PROTECTED]; [EMAIL PROTECTED];
mysql@lists.mysql.com
Sent: Friday, May 06, 2005 9:31 AM
Subject: RE: C API : Problem using multi-statements
Jeremiah
I don't use
Matthew Boehm wrote:
Hey guys,
(Why is there no C API specific list?)
I want to write a C application that can take some audio file, store it in
MySQL, then at a later date/time (upon request) pull from db and write to
temporary file to be streamed.
I've got the storing portion of the code down.
The docs should have it.
Basically these API is what you require (in order):
mysql_init();
mysql_real_connect();
mysql_real_query();
mysql_store_result() or mysql_use_result();
mysql_fetch_row();
mysql_free_result;
mysql_close ();
HTH
--- Matthew Boehm [EMAIL PROTECTED] wrote:
Hey guys,
I provided the list below for our programmers, who also are dealing with
a switch from 3.23 to 4.1. Perhaps it would be of some help for you.
Cheers,
--V
-
We've already hit a couple of API-related problems with the new version
of MySQL. To try to make things a little easier, and
In the last episode (Nov 10), Dave Dyer said:
I have a family of applications which use the C api to access mysql.
I found by doing a test upgrade to 4.1 that all of these applications
crash, apparently because the structures passed between my
applications and libmysql.dll are incompatible.
I have arranged some MySQL C API examples at
http://www.geocities.com/jahan.geo/mysql_c_by_example.html
Larry Brown wrote:
On Sat, 2004-08-28 at 00:48, I wrote:
I know this is more along the lines of a c question; however, I am
trying to write a loop to iterate insertions into a mysql database and
On Sat, 2004-08-28 at 00:48, I wrote:
I know this is more along the lines of a c question; however, I am
trying to write a loop to iterate insertions into a mysql database and
was hoping someone would have a quick fix for this.
I am used to using php with the luxury of the following syntax
Paul DuBois wrote:
At 13:03 -0700 8/11/04, V. M. Brasseur wrote:
Assuming a my.cnf file which looks like this:
[client]
port=3306
socket=/path/to/mysql.sock
[app]
user=appuser
password=apppwd
host=my.host.com
Ignore for now the insecurity of putting a password in the my.cnf
file.
At 8:06 -0700 8/12/04, V. M. Brasseur wrote:
Paul DuBois wrote:
At 13:03 -0700 8/11/04, V. M. Brasseur wrote:
Assuming a my.cnf file which looks like this:
[client]
port=3306
socket=/path/to/mysql.sock
[app]
user=appuser
password=apppwd
host=my.host.com
Ignore for now the insecurity
Paul DuBois wrote:
At 8:06 -0700 8/12/04, V. M. Brasseur wrote:
Paul DuBois wrote:
At 13:03 -0700 8/11/04, V. M. Brasseur wrote:
Assuming a my.cnf file which looks like this:
[client]
port=3306
socket=/path/to/mysql.sock
[app]
user=appuser
password=apppwd
host=my.host.com
Ignore for
At 14:40 -0700 8/12/04, V. M. Brasseur wrote:
Paul DuBois wrote:
At 8:06 -0700 8/12/04, V. M. Brasseur wrote:
Paul DuBois wrote:
At 13:03 -0700 8/11/04, V. M. Brasseur wrote:
Assuming a my.cnf file which looks like this:
[client]
port=3306
socket=/path/to/mysql.sock
[app]
user=appuser
At 13:03 -0700 8/11/04, V. M. Brasseur wrote:
Assuming a my.cnf file which looks like this:
[client]
port=3306
socket=/path/to/mysql.sock
[app]
user=appuser
password=apppwd
host=my.host.com
Ignore for now the insecurity of putting a password in the my.cnf
file. This is mostly a
On Tue, Jul 06, 2004 at 03:40:02PM -0700, Ron Gilbert wrote:
I am going to upgrade my MySQL server from 3.23 to 4.1, but I have a C
program that needs to continue to connect to the new server, and it
can't be recompiled. Is the old API 100% backwards compatible with a
4.1 server? I assume
Matt Eaton [EMAIL PROTECTED] wrote:
Try to profile application from that point ...
if (mysql_real_query(dbase,sqlBuff,strlen(sqlBuff))) {
printf(Pool Attributes Select Failed... dumbass\n);
fprintf(stderr, Error: %s\n,
Hi,
The only thing that could slow you down is that the genAttrib array will take
more and more memory as the result set grows. I would recommend you to create
a function that uses the mysql row directly instead of creating this huge
array.
something like
while ((row =
On Wed, 25 Feb 2004, Sasha Pachev wrote:
where dbh is a global MYSQL structure. This code works fine on the old
system. If I pull it out into it's own little test program on the new
server, it also works fine. But when I put it in with the analog source
code, it compiles fine but
Cliff Addy wrote:
On Wed, 25 Feb 2004, Sasha Pachev wrote:
where dbh is a global MYSQL structure. This code works fine on the old
system. If I pull it out into it's own little test program on the new
server, it also works fine. But when I put it in with the analog source
code, it compiles
Cliff Addy wrote:
I've got on that really has me stumped ...
I've modified tha analog web stats program before to use a mysql database
before and I'm trying to do it again on a new system. I have this
function:
void db_connect(){
printf(start connect\n);
mysql_init(dbh);
if
Thanx so much! mysql_real_connect() certainly works.
Best,
hAj
on 2003.11.11 17:55, Nick Gaugler at [EMAIL PROTECTED] wrote:
http://www.mysql.com/doc/en/mysql_connect.html
This function is deprecated. It is preferable to use
mysql_real_connect() instead.
#includestdio.h
There is a C++ package called OTL (http://otl.sourceforge.net/home.htm).
It supports both MySQL through MyODBC, and Oracle. It works great with
Oracle applications, but we have not used it with MySQL.
Thanks,
Brad Teale
Universal Weather and Aviation, Inc.
mailto:[EMAIL PROTECTED]
713-944-1440
http://www.mysql.com/doc/en/mysql_connect.html
This function is deprecated. It is preferable to use
mysql_real_connect() instead.
#includestdio.h
#includemysql.h
int main(void) {
MYSQL mysql;
if(mysql_init(mysql) == NULL) {
fprintf(stderr,Unable to initlize MySQL
alright. looking at your directory this should be ok.
gcc seeLog.c -o seeLog -I/usr/include -L/usr/lib/mysql -lmysqlclient
;)
Aftab Jahan Subedar
Subedar Technologies
Subedar Baag
Bibir Bagicha #1
North Jatrabari
Dhaka 1204
Bangladesh
sms://+447765341890
tel://+88027519050
[EMAIL PROTECTED]
I use :
numRows = mysql_num_rows( Result);
numFields = mysql_num_fields( Result);
for( j=0; j numRows; j++) {
mysql_data_seek( Result, j);
CurrentRow = mysql_fetch_row( Result);
for( k = 0; k numFields; k++)
* Santino ([EMAIL PROTECTED]) wrote:
I use :
numRows = mysql_num_rows( Result);
numFields = mysql_num_fields( Result);
for( j=0; j numRows; j++) {
mysql_data_seek( Result, j);
CurrentRow = mysql_fetch_row( Result);
Hi,
You can not use native MYSQL C API to handle Oracle DataBase.Work very well
(mixed with MYSQL C API) the ORACLE C API which is named OCI(Oracle Call
Interface).
Regards,
Gelu
_
G.NET SOFTWARE COMPANY
Permanent e-mail address : [EMAIL
There is a C++ package called OTL (http://otl.sourceforge.net/home.htm).
It supports both MySQL through MyODBC, and Oracle. It works great with
Oracle applications, but we have not used it with MySQL.
Thanks,
Brad Teale
Universal Weather and Aviation, Inc.
mailto:[EMAIL PROTECTED]
713-944-1440
Priyanka Gupta wrote:
Is there a way to have a common C API for MySQL and Oracle. I am writing
some software that I would like to work with both MYSQL or Oracle as the
backend server?
priyanka
_
Enjoy MSN 8 patented spam
Hi Priyanka,
BTW, which programming language you are using? In PHP there is a PEAR DB utitlity
which acts as the database abstraction layer.
Regards,
Hardik Doshi
walt [EMAIL PROTECTED] wrote:
Priyanka Gupta wrote:
Is there a way to have a common C API for MySQL and Oracle. I am writing
At 20:14 -0400 10/20/03, Priyanka Gupta wrote:
Is there a way to have a common C API for MySQL and Oracle. I am
writing some software that I would like to work with both MYSQL or
Oracle as the backend server?
The C API for MySQL is specific only to MySQL. You'd have to write your
own
Dave,
The documentation has several examples. Here's a function we use. Are
you having a particular difficulty?
Regards,
Andy.
snip
MYSQL *aDb = NULL;
int xConnect()
{
#define MYSQL_HOST 192.168.103.112 // or host name
#define MYSQL_DBfoodb // database
Look at the source for the mysql client.
It is a perfect example.
Sean Macmillan wrote:
Using the C API I have written a program that calls mysql_query() on a
table with values I know to be in the table. It returns fine and I
then call mysql_store_result. The problem I am having is figuring
At 13:36 -0400 6/19/03, Adam Lawrence wrote:
Stats: MySQL 4.0.13, under Windows98, using the C API with lcc-win32.
Is there any way to determine if mysql_free_result() has been called on a
result set pointer?
There's no API function for that, no.
Occasionally I recycle the pointer (use it, free
After I use mysql_free_result(), I immediately set the resultset to NULL.
-Original Message-
From: Adam Lawrence [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 11:36 AM
To: [EMAIL PROTECTED]
Subject: C API - mysql_free_result
Stats: MySQL 4.0.13, under Windows98, using the C
# [EMAIL PROTECTED] / 2003-06-03 18:45:31 +0200:
Executing gcc.exe...
gcc.exe U:\mep\Dev\abr.c -o U:\mep\Dev\abr.exe
-IC:\Dev-Cpp\include -IC:\mysql\include -LC:\Dev-Cpp\lib
C:\DOCUME~1\badier1\LOCALS~1\Temp/ccW8.o(.text+0x1d2):abr.c: undefined
reference to [EMAIL PROTECTED]'
At 18:45 +0200 6/3/03, [EMAIL PROTECTED] wrote:
Hello,
I'm trying to code a small C client, under windows, with bloddshed Dev-C++,
and i always get an error.
/* Code */
#include conio.h
#include stdarg.h
#include winsock.h
#include stdio.h
#include stdlib.h
#include string.h
#include mysql.h
int
From: [EMAIL PROTECTED]
Date: 2003/06/03 Tue AM 11:45:31 CDT
To: [EMAIL PROTECTED]
Subject: C API
Hello,
I'm trying to code a small C client, under windows, with bloddshed Dev-C++,
and i always get an error.
/* Code */
#include conio.h
#include stdarg.h
#include winsock.h
#include conio.h
#include stdarg.h
#include winsock.h
#include stdio.h
#include stdlib.h
#include string.h
#include mysql.h
int main(void) {
MYSQL* toto;
toto = mysql_init(toto);
}
/* this is the compler log */
Compiler: Default compiler
Executing gcc.exe...
gcc.exe U:\mep\Dev\abr.c
At 10:57 -0600 2/19/03, William R. Mattil wrote:
Hello,
I am having some cockpit trouble with the following
MYSQL_RES *mysql_list_fields(MYSQL *mysql, const char *table, const char
*wild);
and it is like lack of understanding on my part. Syntax is:
if (mysql_list_fields( mysql, some table
At 11:13 -0600 2/19/03, Paul DuBois wrote:
At 10:57 -0600 2/19/03, William R. Mattil wrote:
Hello,
I am having some cockpit trouble with the following
MYSQL_RES *mysql_list_fields(MYSQL *mysql, const char *table, const char
*wild);
and it is like lack of understanding on my part. Syntax is:
--- Amy Joseph Kormann [EMAIL PROTECTED] wrote:
Are there any (significant) changes in the C API between MySQL 3.X and
4.X? If so, where are they located.
Yes.Are some changes between ver 3.x and 4.x.If i understand well i
think you try to find where this changes are
ggelu [EMAIL PROTECTED] wrote:
--- Amy Joseph Kormann [EMAIL PROTECTED] wrote:
Are there any (significant) changes in the C API between MySQL 3.X and
4.X? If so, where are they located.
Yes. Are some changes between ver 3.x and 4.x.If i understand well i
think you try to find where this
Stephen Brownlow wrote:
ggelu [EMAIL PROTECTED] wrote:
--- Amy Joseph Kormann [EMAIL PROTECTED] wrote:
Are there any (significant) changes in the C API between MySQL 3.X and
4.X? If so, where are they located.
Yes. Are some changes between ver 3.x and 4.x.If i understand well i
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Amy Joseph Kormann wrote:
Stephen Brownlow wrote:
ggelu [EMAIL PROTECTED] wrote:
--- Amy Joseph Kormann [EMAIL PROTECTED] wrote:
Are there any (significant) changes in the C API between MySQL 3.X
and 4.X? If so, where are they located.
At 14:21 + 2/7/03, Qin Lu wrote:
Hello,
I'd like to practice my C application for using mysql.
Do you know where can I find some examples?
Look in the client directory of a MySQL source distribution. Many/most
of the standard MySQL clients are written in C.
You can also get examples at
Hello Mark,
thanks for your answer. In fact the mysql shell where I update the row is
using AUTOCOMMIT=1.
Even after I issue a COMMIT manually the changes are not seen by the
application.
What I dont understand is that the program doing a SELECT has to issue an
COMMIT to have all data available.
Hi Stefan,
Does the second shell actually perform those changes? In this case, I
assume
it's got something to do with the isolation level / consistent read in
InnoDB tables. shell1 sees all its changes immediately, shell2 (the
application) has just a snapshot of the data at the time it
Heri,
H. Steuer schrieb:
Hi Stefan,
Does the second shell actually perform those changes? In this case, I
assume
it's got something to do with the isolation level / consistent read in
InnoDB tables. shell1 sees all its changes immediately, shell2 (the
application) has just a
Heri,
- Original Message -
From: H. Steuer [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, December 03, 2002 11:49 AM
Subject: Re: C API problems with InnoDB
Hello Mark,
thanks for your answer. In fact the mysql shell where I update the row is
using AUTOCOMMIT=1
Dear Heri,
I tracked down the problem and saw that its only happening if I set
autocommit=0.
If I run a second mysql shell I can see all changes immediately. Just the
application itself doesnt.
Does the second shell actually perform those changes? In this case, I assume
it's got something to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
H. Steuer wrote:
Hello MySQL users,
I have a weired issue using the MySQL C API and InnoDB tables.
An application polls a database every 30 seconds. When the application
starts everything seems to be fine.
During the running of the application i
Greetings...
Yes.
If you want to traverse two result set in the same time then use the
mysql_store_result(). If you don't have a big resultset coming then probably
mysql_store_result() in the same connection is a better option.
Otherwise you have to use two connections.
Rgds
Insane
SQLyog -
Insanely Great wrote:
Hi!
If you want to traverse two result set in the same time then use the
mysql_store_result(). If you don't have a big resultset coming then probably
mysql_store_result() in the same connection is a better option.
Otherwise you have to use two connections.
Thanx,
just
Most likely this will solve your problem. This comes right from the mysql website
documentation. It is for the C API but I'm sure the same concepts go for C++ as well.
If this doesn't work provide more info on the program you are using for coding and the
errors you are getting. Thanks.
was made.
Please advice and thanks.
wv
-Original Message-
From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
Sent: 09 July 2002 23:03
To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
Subject: Re: C API: mysql_data_seek
Hi,
It's ok but you must retrieve data from row.
int sql_result
]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 10:13 AM
Subject: RE: C API: mysql_data_seek
Hi,
Thanks for ur reply.
When i commented out the mysql_data_seek() function,
mysql_fetch_row()
returns me a non-NULL value (this should be the first row from the
MResult).
This results show
. Please advice.
Once again, thnx for replying.
Regards,
wv
-Original Message-
From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
Sent: 10 July 2002 09:38
To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
Subject: Re: C API: mysql_data_seek
Hi,
If i understand well you use twice
Extern
[EMAIL PROTECTED]
To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 11:42 AM
Subject: RE: C API: mysql_data_seek
Hi Gelu,
Thnx for the prompt reply.
I called mysql_data_seek() once and I called it before mysql_fetch_row().
With this, mysql_fetch_row
-Original Message-
From: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
Sent: 10 July 2002 11:02
To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED]
Subject: Re: C API: mysql_data_seek
Hi,
If i understand well, mysql_fetch_row() work fine but if you add
mysql_data_seek() the row
PROTECTED]
- Original Message -
From: Chan WieVia ICM N MC MI E3 Extern
[EMAIL PROTECTED]
To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 3:03 PM
Subject: RE: C API: mysql_data_seek
Hi Gelu,
Yes, you are right in getting my problem.
I tried
Hi,
It's ok but you must retrieve data from row.
int sql_result;x,i;
MYSQL_RES *MResult;
MYSQL_ROW *row;
MYSQL *MQuery;
char SQLQuery[];
sprintf( SQLQuery, SELECT * FROM Profile );
sql_result = mysql_query(SQLQuery);
MResult = mysql_store_result(MQuery);//mysql_store_result return in
At 19:54 +0200 6/14/02, Hihn Jason wrote:
I'm using the C API to return a record which has a field that contains
(somewhat) binary data. It's been properly mysql_escape_string()ed. I'm
using a 3.23.4x server client.
When I do a:
select data into outfile 'out' from table where id='1';
from the
Hi Carsten,
I've tried Mysql++ and SQLAPI.
I am asking if someone out there know about other best tools in C++ for
Mysql on linux.
Thanks,
Hisseine
- Original Message -
From: Carsten Gehling [EMAIL PROTECTED]
To: Hisseine Dj. [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 06,
In fact, i'm trying to read data from a binary file and want to insert
that into the database. I guess, it would be easier and more efficient if
i use some data structure like we have vectors in C++ API.
Thanks,
Ritu Singla
On Thu, 18 Apr 2002, Robert Cross wrote:
you wrote:
I want
At 5:09 + 3/28/02, Federico Halperin wrote:
In a table, I declared a column which is an integer unsigned.
After calling mysql_fetch_row, I need to convert the value of the
column (i.e. row[0]) to a string.
According to the manual, *all* column values are returned as strings.
I'd say you
hi,
I think u don't need to convert it in to string...
all the column values comes out in string only...
or even u need to use atoi() Function for getting the Int ot unsigned
int...
I have used it...
Chetan Lavti
-Original Message-
From: Federico Halperin [mailto:[EMAIL PROTECTED]]
hi,
I think u don't need to convert it in to string...
all the column values comes out in string only...
I have used it...
Chetan Lavti
-Original Message-
From: Federico Halperin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 10:40 AM
Subject: C API question
In a table, I
multiple commands Not as far as I know, you need to open your file, read
the commands and process them one at a time.
The C API is not magic and has no more capability than you do setting down
and typing in the commands yourself.
What you can do is build one HUGE insert command from lots of
At 11:35 + 3/20/02, Javier wrote:
Hi,
I have a text file , with several MySQL instructions (CREATE TABLE, INSERT,
SET @var, etc.).
I want to execute all these instructions from a C program , using the API.
It is possible to use the function mysql_query(), to execute all the
instructions
At 16:48 -0600 3/7/02, Kenneth Hylton wrote:
Howdy -
I've posted this twice before - third time might be the charmer...
Can anybody help me?
I am using the C API and am returning a result set from a table with a BLOB
type item in it.
When I populate the BLOB fields initially (with all the same
Hi, Kenneth,
On Fri, 2002-03-08 at 08:48, Kenneth Hylton wrote:
I've posted this twice before - third time might be the charmer...
Can anybody help me?
I am using the C API and am returning a result set from a table with a BLOB
type item in it.
When I populate the BLOB fields initially
Thanks, I will have a look at the official site. Is anybody aware of a
non-oficial site that contains an example with a real db as backend.
(With real db I mean tables with a few thousand+ records per table and
advanced queries with multiple joins) and then how one can optimise the
c code to run
Christopher Thompson writes:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
For various reasons, I need a C++ API to MySQL for use in Windows (and
possibly Linux as well). I know I can find one or two in the
downloads/contrib section but I'm looking for suggestions.
I'm quite happy
Chris Allum writes:
Hi,
I'm trying to use the mysql++ API on MacOS X with Project Builder, but I am
not sure what to do to get started.
Any suggestions?
Thanks,
- Chris
--
Christopher Allum [EMAIL PROTECTED]
Hello,
I have corrected the code as I would have written it. Also are you sure the
file mysql.h
is where you think it is?
#include stdio.h
#include mysql/mysql.h
main()
{
int sel;
MYSQL mysql=NULL;
MYSQL *connection;
MYSQL_RES *result;
mysql_init(mysql);
Hi,
[..]
produces the following error messages.
/tmp/ccPhnnJk.o: In function `main':
/tmp/ccPhnnJk.o(.text+0x14): undefined reference to `mysql_init'
/tmp/ccPhnnJk.o(.text+0x5a): undefined reference to `mysql_real_connect'
/tmp/ccPhnnJk.o(.text+0x6d): undefined reference to `mysql_query'
| query_len = sprintf(query, CREATE TEMPORARY TABLE temp SELECT );
try it out with asprintf().
but you have to define at compile time the following -D_GNU_SOURCE
maybe you allocates not enough place for query. asprintf do it for you.
char *query;
int query_len;
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
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,
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
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,
1 - 100 of 126 matches
Mail list logo