Re: Programming MySQL in C

From: J.O. Aho <user_at_example.net>
Date: Wed, 17 May 2017 18:08:10 +0200
Message-ID: <eo3araFe1p7U1_at_mid.individual.net>


On 05/17/17 17:47, Jerry Stuckle wrote:
> On 5/16/2017 2:31 AM, bit-naughty_at_hotmail.com wrote:

>> I'd like some info on this - my book has a little, so I was just wondering - does anyone do this these days? Is like, the mysql C library included with  a modern, say, CentOS?
>> And, most importantly - what's a quick n easy way to print HTML in C? For a page that will have normal HTML interspersed with DB output, do I have to put a slash before every quote mark if I haave a PRINT statement with HTML in it? I suppose I could do a search-and-repace in my text editor to replace every " with a \", but - IS THERE A BETTER WAY? One other way I guess would be to put every separate little bit of HTML in a separate file, and pull it up and print it in the C proggy, but - that would be Bloody Slow!
>>
>> Anything else?
>>
>>
>> Thanks.
>>

>
> I do a fair amount of C work with MySQL. It works well (although for
> more critical code I generally use DB2 or Oracle - both have free
> versions available but you have to install them yourself).
>
> When you say "print HTML in C", are you talking about to a browser? Are
> you trying to do it with a web server? Neither is easy to do in C; for
> the former you need to open a TCP/IP port and wait for a connection
> request from the browser, then decode the request and process it. And
> to work with a web server, you'll need to find some third-party libraries.

Nah, you can use cgi, the web server handles the connections. You still need to keep track of content headers.

-- 

 //Aho
Received on Wed May 17 2017 - 18:08:10 CEST

Original text of this message