Database

bash script with sql to get the number of records from multiple tables.

bash script with sql to get the number of records from multiple tables.No Gravatar Hot: Here is the bash script: #!/bin/sh names[1]=errorlog names[2]=amit1log names[3]=amit2log names[4]=amit3log names[5]=amit4log j=1 echo $1 for i in $( sqlplus amit/passwd@tns @get_count.sql |sed  -n ‘/COUNT/,/Disconnected/p’|sed ‘/COUNT/ d’|sed ‘/—/ d’|sed ‘/Disconnected/ d’|tr ‘n’ ‘ ‘  ) do temp=${names[$j]} let count=30-${#temp} for ((I=1; I <= $count ; I++)) do printf ” ” done echo  “${names[$j]}    : $i” # echo $j let j=j+1 done echo echo More > Sharevar el = document.getElementById('share-link-202716638');el.params = {title: 'bash script with sql to get the number [...]

Technorati Tags: bash, oracle, script, Solaris, sql

Blog Traffic Exchange Related Websites

Execute mysql command from shell

Execute mysql command from shellNo Gravatar Hot: phpMyAdmin is a very slow application if you want to execute a query on your database. If you know the name of the database then any GUI tool is an overhead. So I have written a one liner shell script to do that for me More > Sharevar el = document.getElementById('share-link-417756604');el.params = {title: 'Execute [...]

Technorati Tags: Command Line, db, mysql, one liner, query

Blog Traffic Exchange Related Websites

Using PHP to search a MySQL database and return paged results

Using PHP to search a MySQL database and return paged resultsNo Gravatar Hot: Using PHP to search a MySQL database and return paged results More > Sharevar el = document.getElementById('share-link-548752180');el.params = {title: 'Using PHP to search a MySQL database and return paged results', link: 'http://blog.amit-agarwal.co.in/2009/12/04/using-php-to-search-a-mysql-database-and-return-paged-results/', skin: 'blue', content: 'http://blog.amit-agarwal.co.in/?ibsa=get_content&id=154'};Originally posted 2008-10-19 20:17:30.

Technorati Tags: mysql, php

Blog Traffic Exchange Related Websites