>Is there a way to block insert into mysql(5.0) using c api of mysql
>db..
It is possible to use C to build up a query string and, using the
non-standard-C C MySQL API, get the query executed. That string
can be very long. sprintf() or repeated application of strcat()
might be appropriate here.
>then i fil abov 2 arrays wit values and then the PROBLEM...
>Is there a way to above 500 records using below insert query usin' c
>api of mysql db..
Yes, you can insert 500 records with one INSERT query, assuming the
values aren't so long that you exceed the maximum query length.
>INSERT INTO table VALUES (?, ?)
INSERT INTO table values
(55, 'spamming'),
(86, 'scamming'),
(137, 'Nigerian bank fraud'),
(872, 'Murder'),
....
(999, 'Income Tax Evasion');
You don't have to format the query with embedded newlines, but it's allowed.
|