Normally we Dump data in such manner:
What i require is i just want to dump data till yesterday !!!
mysqldump -u root -p gateway > dumpfilename.sql
You can pass -e parameter with query that should be executed:
mysqldump -u root -p troy22022012 -e "SELECT * FROM gateway WHERE ..." > dumpfilename.sql