Re: Programming MySQL in C

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Wed, 17 May 2017 11:47:33 -0400
Message-ID: <ofhr3v$94v$1_at_jstuckle.eternal-september.org>


[Quoted] [Quoted] 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.
>

[Quoted] 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.

In either case, I would be looking at a different language. Or, if the requirement is to use C, I wouldn't be looking to output HTML.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Wed May 17 2017 - 17:47:33 CEST

Original text of this message