Just now I am working with a problem where I need to update a column/field by appending something. I was in a bit trouble for a 2 mins as I was finding a solution for this. First thing came to my mind is
UPDATE `table_name` SET `field_name`=`field_name`+’appending string’ WHERE `field_name`=’xxx’;
I knew this won’t work in my [...]
Archive for Posts Tagged MySQL:
PDF output generating library using PHP
If you are looking for creating PDF output of your HTML pages, you can do it using PHP’s PDFlib module. However, there are some libraries for faster development of your script. Some even are not dependent on PDFlib. Please see below for quick overview.
DOMPDF
dompdf is an HTML to PDF converter. At its heart, dompdf is [...]
Concat multiple rows!
Today I was wondering how can I concatenate multiple rows in a single row. Suppose, I need to get the email addresses of a user table. The “SELECT `email` FROM `usertable`;” will return something like this:
email1
email2
email3
But I needed:
email1, email2, email3
It is very easy to process and make same output using PHP. But I thought there [...]
MySQL starting failed!
Today one of my junior friend asked me to help with his new VPS. He was in trouble that his mysql server was not starting up. After logging in the server, I saw the problem. It was showing:
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
I tried many ways. But none worked. Later, thought, [...]
PHP_SELF is empty!
Last two days, I am playing or learning to play with nginx web server. I have heard some reputation about it and saw some performance chart in the web. I liked it for its, as claimed, extremely low memory footprint for one of my small VPS.
After reading some tutorial in Projanmo Forum, I am successfully [...]
MySQL problem
Today, I have to waste a long time with new server. Last night my internet connection disconnected while cPanel was installing in the server. Later I have seen that everything running fine except mysql. It is showing some error like:
Warning, no valid mysql.sock file found.mysql has failed
searching many tutorials, forums after 2/3 hours later I found the following post. http://forums.spry.com/showpost.php?s=06fff7fc89bd04e88fbdf1ecf60f4be1&p=2055&postcount=6




