Re: Programming MySQL in C
Date: Tue, 16 May 2017 19:36:54 +0200
Message-ID: <eo0rlmFr0ojU1_at_mid.individual.net>
On 05/16/17 08:31, 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?
There are still projects which uses cgi, but some of them do migrate to php or python.
> Is like, the mysql C library included with a modern, say, CentOS?
if you go C++ you could try: yum install mysql++-devel
> 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?
You can always use streams for outputting if you are using C++, just don't forget to include headers.
> IS THERE A BETTER WAY? One other way I guess would be to put every separate little bit of HTML in a separate file
Sure you can store the HTML in files, you read in, and inject the data from database into the HTML data.
> and pull it up and print it in the C proggy, but - that would be Bloody Slow!
Just get more CPU power ;)
> Anything else?
You can let the C/C++ take care the communication with the database and have a PHP/Python layer which do handle the HTML output. Tend to be easier to make changes and you get to use queues to transfer the data between the layers.
-- //AhoReceived on Tue May 16 2017 - 19:36:54 CEST