Working on a Thursday afternoon, I came across a problem where we had to return multiple counts (about 10 of them ) in an application. One way was to have multiple stored procedures and call them one by one, but this would mean I would have to make 10 connections to the database and 10 opens , 10 closes, phew !


So I decided to combine all of them into one:
  • Share/Bookmark

Ever wonder how to scroll upwards in mysl resultset ?

What if your terminal doesn’t allow scrollback or the scrollback buffer is somehow set to sreen lines ?

How to use MORE or LESS unix commands in mysql which would allow to scroll using ‘return’ or ‘spacebar’

Follow the steps given below:

[Invoke mysql using the --page command]

  1. mysql --page uuser -p  
  2. [set the pager to use less]

  3. mysql> pager less
  4. [run your query]

  5. mysql> select * from table_name

This also  works under the unix ‘screen’ terminal emulation

  • Share/Bookmark

Welcome to the world of LAMP.

For all you disgraceful people who don’t know what it is, the definition:

L = > Linux ( Its an operating system )
A => Apache ( Its a web server )
M => MySQL ( Its a database system )
P => PhP {&perl } ( These are programming languages )

Wiki page: http://en.wikipedia.org/wiki/LAMP_(software_bundle)

We, here, at Lamp-World are group of people who live eat and think lamp.  This site is aimed to have a collection of amazing ‘scripts’ , ‘tweaks’ and ‘solutions’ which you may not find anywhere else.

  • Share/Bookmark
© 2010 Think Lamp Suffusion WordPress theme by Sayontan Sinha