Ananda Kumar wrote:
which file are u talking about.
regards
anandkl
Ordinary temp file.. say example in C:\output.txt
Actually i have given that file as input to some procedure, based on
that modification time we have calculate some details.
--
MySQL General Mailing List
For list
you can do that using OS command, any specific reason u want to use stored
proc to get this information.
On 7/24/08, Sivasakthi [EMAIL PROTECTED] wrote:
Ananda Kumar wrote:
which file are u talking about.
regards
anandkl
Ordinary temp file.. say example in C:\output.txt
Actually i
Ananda Kumar wrote:
you can do that using OS command, any specific reason u want to use
stored proc to get this information.
OS Command? could you explain with examples? because, I have more # of
input files.. thats why iam going to procedure..
--
MySQL General Mailing List
For list
file_name
ls -ltr abc.txt
-rw-r--r-- 1 root root 34296 Jul 23 15:07 abc.txt
Is this what your looking at?
On 7/24/08, Sivasakthi [EMAIL PROTECTED] wrote:
Ananda Kumar wrote:
you can do that using OS command, any specific reason u want to use stored
proc to get this information.
OS Command
how to Get file modified time and date of file by using builtin
function or procedure in sql?
On Codd's rules, it oughtn't to be possible---it'd be a backdoor. If
there is a need to know the datetime of the last mod to a table, that
info ought to be in a column in a table.
PB
--
MySQL
are using a procedural language to call MySQL. Why
don't you use that language to obtain the file info?
-John
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
On Thu, Jul 24, 2008 at 1:17 AM, Sivasakthi [EMAIL PROTECTED] wrote:
Hi All,
how to Get file modified time and date of file by using builtin function or
procedure in sql?
In a related thread from earlier today you were advised that any
interaction with the filesystem should be done via
|
|9 | Online demos|
+--+-+
Is this possible without using a subquery or union?
Many thanks,
Andy
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Many thanks for the quick replies! This solution appears the most elegant:
-- Forwarded message --
From: Markus Grossrieder [EMAIL PROTECTED]
Date: 2008/7/1
Subject: Re: force row to appear at top of results using order by
To: Andrew Martin [EMAIL PROTECTED]
Andrew,
something
of results using order by
Hello,
I have an order by question...
This is the raw data...
mysql SELECT events_groups_id, events_groups_name FROM events_groups;
+--+-+
| events_groups_id | events_groups_name
-Original Message-
From: Andrew Martin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2008 9:20 AM
To: mysql@lists.mysql.com
Subject: force row to appear at top of results using order by
Hello,
I have an order by question...
This is the raw data...
mysql SELECT events_groups_id
Eber Duarte wrote:
I noticed that I always have 2 processes runing on Linux doesn't
matter the amount of concurrent connections that is running on MySQL.
Due to that, MySQL is using only 1 CPU instead of using 8 CPUs that
exist on this machine:
Do you have enough concurrent load to occupy 8
to that, MySQL is using only 1 CPU instead of using 8 CPUs that
exist on this machine:
Do you have enough concurrent load to occupy 8 CPUs?
Here's a sample 'top' from one of my machines (also 8-way):
top - 18:12:58 up 12 days, 23:22, 6 users, load average: 2.95, 3.02, 3.53
Tasks: 177
that is running on MySQL.
Due to that, MySQL is using only 1 CPU instead of using 8 CPUs that exist on
this machine:
linux$ ps aux | grep mysql
root 20327 0.0 0.0 64048 1272 ? S 10:05 0:00 /bin/sh
./bin/mysqld_safe --defaults-extra-file=/mysql/my.cnf --datadir=/mysql/data
I usually use the --tabs option on mysqldump. However, if a table has a
function, procedure, or trigger, the code is not written to a file but
rather to standard out. Is this the only way to dump them using the --tabs
option? I thought of trying to use the Information Schema database somehow
You should keep it on in my opinion.
On Tue, May 13, 2008 at 6:04 PM, Nico Sabbi [EMAIL PROTECTED] wrote:
Hi,
I guess that when I'm using only Innodb and no replication I can
safely disable mysql's (bin-) log files (that grow to no end) because
Innodb has its own log files. Is it correct
NULL
NULL NULL 108 Using where
thanks in advance
Hi,
I guess that when I'm using only Innodb and no replication I can
safely disable mysql's (bin-) log files (that grow to no end) because
Innodb has its own log files. Is it correct?
Thanks,
Nico
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Hi all,
I want to export the values based on the condition. I export them as csv.
select * into outfile 'filename.csv' from table;
the problem is one field in table has many lines, means with \n. I couldn't
import the values into the xls sheet.
any ideas how to escape the new line
new lines using select * into outfile
Hi all,
I want to export the values based on the condition. I export them as
csv.
select * into outfile 'filename.csv' from table;
the problem is one field in table has many lines, means with \n. I
couldn't import the values into the xls sheet.
any ideas
Try using:
select * into outfile 'filename.csv' fields enclosed by '' terminated by
',' lines terminated by '\n' from table
Regards,
Velen
- Original Message -
From: Saravanan [EMAIL PROTECTED]
To: mysql mysql@lists.mysql.com
Sent: Tuesday, May 13, 2008 9:26 PM
Subject: how to escape
thanks velen. But I want to escape the newlines in the fields. It is annoying
and new lines moves the values in separate line of excel sheet.
Thanks,
Saravanan
--- On Wed, 5/14/08, Velen [EMAIL PROTECTED] wrote:
From: Velen [EMAIL PROTECTED]
Subject: Re: how to escape new lines using select
Hi,
On Mon, Apr 14, 2008 at 1:54 PM, Jamie Madill [EMAIL PROTECTED] wrote:
Hello,
Basically I want to know if this is a good query for indexing.
I have the following query:
select
count(1) as count
from
session
where
last = DATE_SUB(NOW(), INTERVAL :from SECOND)
Is it
Hello,
Basically I want to know if this is a good query for indexing.
I have the following query:
select
count(1) as count
from
session
where
last = DATE_SUB(NOW(), INTERVAL :from SECOND)
Is it safe to assume that the expression calling the function DATE_SUB
is evaluated just once to a
Hello,
I've got a table which containes two date colomns.
The first one is called `date` and the second `update`
In the first one I put the ticket creation date, and on update I add or
change the update value.
So the update colomn does not contain a value until the first update has
been done.
I
mysql version?
http://dev.mysql.com/doc/refman/5.0/en/case-statement.html
order by case when updated is not null then updated else created end desc;
/Kristian
On Tue, Apr 8, 2008 at 1:04 PM, Richard [EMAIL PROTECTED] wrote:
Hello,
I've got a table which containes two date colomns.
The
Hello I've tried the following with mysql 4.1.11
SELECT * FROM quick_contact WHERE (`status` = '0') OR (`status` = '2'
AND `update` '.(time()-864000).') CASE WHEN `update` = '' THEN ORDER
BY `date` DESC ELSE ORDER BY `update` DESC END CASE;
It does not work but, is it my code that is wrong
Can't you do Something like:
ORDER BY (update,date)
The major column of ordering would be update and the second date.
I'm not sure about this solution
On Tue, Apr 8, 2008 at 8:54 AM, Richard [EMAIL PROTECTED] wrote:
Hello I've tried the following with mysql 4.1.11
SELECT * FROM
Thanks,
I think that your solution will be sufficient for my needs, however I
would still like to know for my personal knowledge how to manage
correctly this kind of need.
And to make it more complicated I've just rearlised that there is
another element to take into account, I would need to
A modification to my last email, try:
SELECT
*, IF(update != '', update + 10, date) AS o
FROM
my_table
ORDER BY o DESC;
+-+--++--+
| num | date | update | o|
+-+--++--+
| 5 | 40 | 90 | 100 |
| 2 | 10 | 60 | 70 |
| 6 | 50 |
I think the easiest is to create a new logical column with the correct
ordering, something like:
SELECT *, IF(update != '', update, date) AS o
FROM my_table ORDER BY o DESC;
I note that both 'update' and 'date' are reserved works :)
Also worth noting that this cannot be assigned an index
Thanks, it works like a charm :)
Ben Clewett a écrit :
A modification to my last email, try:
SELECT
*, IF(update != '', update + 10, date) AS o
FROM
my_table
ORDER BY o DESC;
+-+--++--+
| num | date | update | o|
+-+--++--+
| 5 | 40 | 90
Richard,
No problem, glad it works. But note: this is not scalable. If you have
more than a few hundred rows, you may want to think about a better
solution, like storing the order field permanetly and giving it an index :)
Ben
Richard wrote:
Thanks, it works like a charm :)
Ben Clewett
Thanks,
This is for the unanswered list of questions, so the output list (not
the list stored in the mysql database) should never go over 100.
by scalable, do you mean alot of ressources being used or a long wait
for the answer? Because I belive I Could just use a simple limit if I
needed
On Tue, 8 Apr 2008, Richard [EMAIL PROTECTED] wrote:
Kristian Myllym?ki a ?crit :
mysql version?
http://dev.mysql.com/doc/refman/5.0/en/case-statement.html
order by case when updated is not null then updated else created
end desc;
Hello I've tried the following with mysql 4.1.11
SELECT *
Not sure, but perhaps an even simpler method would be to consider the
initial insert an update as well... so the update column would always have
a value. Then the sort would (I believe) always be in the order you want,
and if you need to differentiate between rows that are new vs rows that
are
Richard,
The query I gave you required the column 'o' to be calculated for each
row at the time of gathering the data. When all rows have been
gathered, the data will be stored and sorted in a temporary table. This
temporary table will be in memory or on disk depending on the setting of
Yes that would be easier, except that I would still have to create a
tempory table to add 10 days onto the ones which have a status waiting
for answer from customer and have not been answered for more than 10 days.
This system is for customers who do not have an account yet to contact
me. And
On Wed, 05 Mar 2008 00:13:56 -0500, Michael Hemer wrote:
I have been researching to see if it's possible to have a MySQL database
with it's data files on a cd-rom, but could use some help to determine
if I have found out the full truth of what's possible. I would
appreciate any additional
I believe that this situation could work with ldap, but it is not what I had
imagined. I was picturing a database for retail. The database could hold a
list of products for sale and details relating to those products.
-Michael
Thufir [EMAIL PROTECTED] wrote
On Wed, 05 Mar 2008 00:13:56
direct access from a hard drive), as well
as the version limitations. If the MySQL databases on the CD are, for
example, in MySQL 5.x format, but your end-user is still using MySQL
3.23, it's not going to work. Also, there will need to be some
configuration variables modified on each end-user system
will be slower than direct access from a hard drive), as well
as the version limitations. If the MySQL databases on the CD are, for
example, in MySQL 5.x format, but your end-user is still using MySQL
3.23, it's not going to work. Also, there will need to be some
configuration variables modified
not
be a problem. An important factor is that the data is stored on a CD-R and the
person receiving the data can use it directly from the CD-R without needing to
copy it anywhere else.
I have found that using MyISAM as the storage engine appears to work, but was
wondering if other storage engines could
Hello,
This time I'm rearly not sure if this is possible to do. I've got two
queries that I would like to bring together to make only one query ...
I've got a list of users
And also a login table
I would like to list all users and show the number of times they have
logged in.
So to get
Richard,
Can I do something like this :
SELECT a.username, a.first_name, a.last_name,b.(SELECT COUNT(*) AS count
FROM login_table b WHERE a.username = b.username) FROM user_list a
Try ...
SELECT a.username, a.first_name, a.last_name,COUNT(b.username) AS count
FROM user_list a
JOIN login_table
Hi, and thankyou for trying to help me out! I've tried this and it does
not work. Here are the problems :
1) If a user has never logged in he doesn't show the user in the list
2) It doesn't count if it is 0 it's not on the liste and if the user
has logged in more than once the result is 1
Sorry it's me again, I made a mistake, it counts the number of logins
correctly, but does not show members with 0 logins !
Any idea how to do this?
Thanks :)
Peter Brawley a écrit :
Richard,
Can I do something like this :
SELECT a.username, a.first_name, a.last_name,b.(SELECT COUNT(*) AS
To
[EMAIL PROTECTED], mysql@lists.mysql.com
cc
Subject
Re: group a select * and a select COUNT from 2 different tables using
result of first table to do the COUNT ... is it possible ?
Sorry it's me again, I made a mistake, it counts the number of logins
correctly, but does not show members
: group a select * and a select COUNT from 2 different tables using
result of first table to do the COUNT ... is it possible ?
Sorry it's me again, I made a mistake, it counts the number of logins
correctly, but does not show members with 0 logins !
Any idea how to do this?
Thanks :)
Peter
Try this one:
SELECT a.username, a.first_name,
a.last_name,COALESCE(COUNT(b.username), 0) AS count
FROM user_list a
LEFT JOIN login_table b ON a.username = b.username
GROUP BY a.username,a.first_name,a.lastname;
The LEFT JOIN will ensure you still get a result row even if there are
no
Richard,
1) If a user has never logged in he doesn't show the user in the list
2) It doesn't count if it is 0 it's not on the liste and if the user
has logged
in more than once the result is 1 (because of the group by ...).
Do you mean by #1 that you want to list all users whether they have
/query-database-using-an-outside-variable-tp15476487p15476487.html
Sent from the MySQL - General mailing list archive at Nabble.com.
Hi
How do I create a table inside a perl script using a hash to give table name
and mysql statements?
thanks.
--
View this message in context:
http://www.nabble.com/CREATING-A-table-using-a-hash-in-perl-tp15353263p15353263.html
Sent from the MySQL - General mailing list archive at Nabble.com
Hello MySQL List,
Thanks Ken and HongKong0888 for the advice and suggestions.
I hate when these kinds of problems just fade away with no
resolution or analysis of the resolved issue. So, with that,
here is the explanation for what caused THIS particular
problem (can you say user error?).
In
My guess is that you have the privileges set on your local box that
allow connections with those credentials but the same privileges are
not set up on your clients machines.
Although using apache as a user without a password is quite a security
risk. And then mailing those details to a public
hundreds of times with no trouble
but the last two in a row have required that the permissions be reset.
I am just looking at the error messages in the emails I am getting and
apparently it is not just the Apache user. It is sending access denied
for the site account owner too, I just noticed.
I am using
Dan,
Thanks very much for responding to my problem post.
I was hoping I was just missing something in the syntax.
Looks like I made a very big mistake recommending MySql to my Client.
I have hundreds of SQL statements in the code I am converting for them. It is
C code in IBM DB/2 running on OS/2
syntax no matter what underlying database you are
using. MySQL didn't even have prepared statements at all until 4.1,
and if DCConnect supports them in earlier MySQL versions, it must have
done the work itself.
I tried another approach... building the SQL statement string with
sprintf, still a pain
Hello,
Doing C coding with MSql.
What am I missing here?
I am needing to do standard INSERT statements using variables for the VALUE
fields
These fields are changed in the application befre I issue the INSERT. The
current proram uses : before the variable to make it work.
Like this: INSERT
In the last episode (Jan 22), [EMAIL PROTECTED] said:
Hello,
Doing C coding with MSql.
What am I missing here?
I am needing to do standard INSERT statements using variables for the
VALUE fields These fields are changed in the application befre I
issue the INSERT. The current proram uses
-on-partitioned-table-using-hash-tp14841410p14841410.html
Sent from the MySQL - General mailing list archive at Nabble.com.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
to use DROP USER with
a variable name in a stored procedure? If not, is there some way to
drop a bunch of users given a table of usernames? Perhaps this problem
has only ever been tackled using a higher level language - but I was
hoping to solve it in a little mysql script.
Thanks. Hope you have
On Jan 7, 2008 2:34 AM, Shawn Green [EMAIL PROTECTED] wrote:
Eddie Cornejo wrote:
I'm writing a cleanup script to remove database items created by my
application. One of the things I would like to remove are all user
accounts created through my application... This is proving to be
harder
with
a variable name in a stored procedure? If not, is there some way to
drop a bunch of users given a table of usernames? Perhaps this problem
has only ever been tackled using a higher level language - but I was
hoping to solve it in a little mysql script.
Thanks. Hope you have a great 2008!
--
Eddie
Bad news: I have a slow query that doesn't appear to be using an index
even if I force it.
Good news: the forehead shaped dent in my desk is really progressing well.
Here's the query:
SELECT DISTINCT poster_data.*
FROM poster_data, poster_prodcat, poster_categories
WHERE
Ian M. Evans wrote:
Bad news: I have a slow query that doesn't appear to be using an index
even if I force it.
Good news: the forehead shaped dent in my desk is really progressing well.
Here's the query:
SELECT DISTINCT poster_data.*
FROM poster_data, poster_prodcat, poster_categories
WHERE
One of the list readers (thanks Brent!) suggested using a full text
index on the category names field. Queries dropped from 10-49 seconds
down to 0.0085
Thanks for the emails folks!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
'
and MOLEC=MOL;
select P1+P4+P6+P7+P9 into output;
return output;
end
//
And it works, now, i would like index a table using this function.
The table description is:
mysql describe precalc;
+---+-+--+-+-++
| Field | Type
mysql create index AA on precalc (IDR(P1,P4,P6,P7,P9,'HLA-DRB13'));
But i Get the following error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near ''P1','P4','P6','P7','P9','HLA-DRB13'))'
'
and MOLEC=MOL;
select P1+P4+P6+P7+P9 into output;
return output;
end
//
And it works, now, i would like index a table using this function.
The table description is:
mysql describe precalc;
+---+-+--+-+-++
| Field | Type
, as far as i can see, from mysql 5.0 and upper it is possible create
index using functions.
http://www.faqs.org/docs/ppbook/r24254.htm
But i keep having problems with the exemple from the link. Is there any bug
in mysql 5.0.24a-log?
2007/11/13, Martijn Tonies [EMAIL PROTECTED]:
mysql
, as far as i can see, from mysql 5.0 and upper it is possible create
index using functions.
http://www.faqs.org/docs/ppbook/r24254.htm
But i keep having problems with the exemple from the link. Is there any bug
in mysql 5.0.24a-log?
The above website says:
Practical PostgreSQL
I cannot
Hello,
sorry if this is not the right mailing list to ask this question, hope someone
can point me to a better list in the case.
My problem is that I'd like to use mysql as database for storing user accounts
for different services, and I started using vsftpd. Now, following the
instruction
Hi All!
Here is a funny thing I come across when investigating our privilege control
system. Consider the following situation:
mysql GRANT ALL ON `%o`.* TO rafal;
mysql GRANT SELECT ON foo.* TO rafal;
The intention is that rafal has all privileges for all objects in databases
whose name
Hello guys,
I would like to get some registers on my database that are older than 90
days, and after delete it because the table is very larger:
mysql select count(*) from max_ecardsent;
+--+
| count(*) |
+--+
| 1172330 |
+--+
1 row in set (0.01 sec)
But I'm confusing
Hi,
I'm thinking of using the COMMENT of columns when
creating tables to store some metadata about the
column, for instance: valid_range of numbers,
validation regexp, etc.
I did some tests with including this information as
a JSON (JavaScript Object Notation) string which can
then be easily
Hi,
I'm thinking of using the COMMENT of columns when
creating tables to store some metadata about the
column, for instance: valid_range of numbers,
validation regexp, etc.
I did some tests with including this information as
a JSON (JavaScript Object Notation) string which can
On 9/17/07, Martijn Tonies [EMAIL PROTECTED] wrote:
Do you have any comments about this approach?
What could possibly go very bad about relying on
this usage of the COMMENT?
Yes, in different storage engines, different stuff is returned.
For example, in InnoDB, what you get returned from
Do you have any comments about this approach?
What could possibly go very bad about relying on
this usage of the COMMENT?
Yes, in different storage engines, different stuff is returned.
For example, in InnoDB, what you get returned from
SHOW FULL COLUMNS is not what you stored
I currently use MyISAM, but I just tried a simple
create(InnoDB)/show full columns from/ and
it actually does return the JSON strings I put in.
Try it on columns with a foreign key constraint.
I did and it still works (maybe the behaviour is version
dependent?).
Here is what I did:
I currently use MyISAM, but I just tried a simple
create(InnoDB)/show full columns from/ and
it actually does return the JSON strings I put in.
Try it on columns with a foreign key constraint.
I did and it still works (maybe the behaviour is version
dependent?).
Hmm, could be.
Hi All,
I'd like to restrict queries using the username of the user that
issued the query. I know about the available user restrictions in the
database, but they seem limited to whole tables and columns. What I
need is limiting the access on row level. If I can access the
username, I'd
Peter Teunissen wrote:
Hi All,
I'd like to restrict queries using the username of the user that issued
the query. I know about the available user restrictions in the database,
but they seem limited to whole tables and columns. What I need is
limiting the access on row level. If I can access
I have an index on `food` and on `active`, how come the result of the
EXPLAIN doesn't show the query using an index? I'm concerned that as
the query time will grow with the table.
My Query:
SELECT `food` , COUNT( `food` ) AS 'population'
FROM `users`
WHERE `active`=1
GROUP BY `food`
LIMIT
then be used by the group by.
alter table user add index(active, food);
This is off the top of my head, hope that it helps.
Les
James Tu wrote:
I have an index on `food` and on `active`, how come the result of the
EXPLAIN doesn't show the query using an index? I'm concerned that as
the query
then be used by the group by.
alter table user add index(active, food);
This is off the top of my head, hope that it helps.
Les
James Tu wrote:
I have an index on `food` and on `active`, how come the result of the
EXPLAIN doesn't show the query using an index? I'm concerned that as
the query
You can do it as long as there is only a single record with the max
value. If there is more than 1 record with the same max value, there
isn't a single record to pull.
To do it, you would need to join on the results of the max query, and
part of the join condition would be the max value
Hi,
I need to select a max value for a group of records and I also need the
primary key for that record.
I am wondering if this can be done with a single query? e.g
Table_x
id count cat_id
110 1
220 2
335 2
415 1
with
SELECT id, cat_id,
:
Erroneus column using MAX() and GROUP BY
and
Help with subqueries... MAX() and GROUP BY
Also these links may help.
http://dev.mysql.com/doc/refman/4.1/en/example-maximum-column-group-row.html
http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per
-group-in-sql
The grant flag is enabled on the root account:
mysql SELECT Grant_priv FROM user WHERE User='root' AND Host='localhost';
++
| Grant_priv |
++
| Y |
++
1 row in set (0.01 sec)
mysql SHOW GRANTS FOR 'root'@'localhost';
Grants for [EMAIL PROTECTED]
The grant flag is enabled on the root account:
mysql SELECT Grant_priv FROM user WHERE User='root' AND Host='localhost';
++
| Grant_priv |
++
| Y |
++
1 row in set (0.01 sec)
mysql SHOW GRANTS FOR 'root'@'localhost';
Grants for [EMAIL PROTECTED]
With assistance from a friend this issue has been rectified.
The current GRANT was not sufficient. After executing the new GRANT
with 'ALL PRIVILEGES' (using the --init-file switch) the root user can
now issue GRANTS.
Additionally I apologise for duplicate posts, It was not intentional.
On 9/2
We have had some cases where we wanted to recover data using the binlogs
from some days ago. The database has a lot of binary objects (blobs).
The normal way to recover are to restore database files from a
consistant point, and then use mysqlbinlog to spool from that point till
where we want
Its not possible in innodb or myisam engine, you can do it using fedrated if
i am not wrong.
regards
anandkl
On 8/10/07, krishna chandra prajapati [EMAIL PROTECTED] wrote:
Hi All,
There are two mysql server. I need to retrive data from two different
hosts
(mysql server) and by using
Hi All,
There are two mysql server. I need to retrive data from two different hosts
(mysql server) and by using a join make a query.
Is it possible to make a query which can fetch data from two different mysql
server using join.
-Regards,
Krishna
Hi Everybody,
If any body knows how to implement federated storage engine and how to setup
it. How it works.
Please enrich me also.
-Regards,
Krishna
On 8/10/07, Ananda Kumar [EMAIL PROTECTED] wrote:
Its not possible in innodb or myisam engine, you can do it using fedrated
if i am not wrong
, 2007 at 11:04:13AM +0800, wangxu wrote:
actually I am using this piece of code,but I replaced fprintf to printf
just to simplify the problem.
and the field content actually stores string content.
Shall this mean some thing different from your explanation?
while (r
wangxu wrote:
actually I am using this piece of code,but I replaced fprintf to printf
just to simplify the problem.
Everything I said about printf() applies equally to fprintf(). The %s
work-around suggested by Pete Harlan will work, but not for very good
reasons. Again: see examples
.
Otherwise, if your r[content] happens to return a string that
contains %s or some other thing that causes fprintf to look for more
data on the stack, you'll get output you weren't expecting.
--Pete
On Thu, Aug 02, 2007 at 11:04:13AM +0800, wangxu wrote:
actually I am using this piece of code,but I
below is my code;these code works very fine until, the length of the
field content exceeds 30,
then segment fault happened.
how can I avoid this?
mysqlpp::Query query = conn.query();
query select content from pages where id=id;
mysqlpp::ResUse
401 - 500 of 3107 matches
Mail list logo