Category: mysql

Searching For Fee Car Classifieds Script

Check out this article about Searching For Fee Car Classifieds Script. Please tell me what you think about it. You can contact me anytime!

Cars are no longer a luxury nowadays (except if you want to own a Ferrari or something). Cars are now a necessity in today’s standard of living. And let’s face it, with the price of brand new cars and the forever raising price of gasoline, not every one can buy a new set of wheels.

Thanks to websites that offer to sell (and buy) second hand, used cars many people can have places to search for and are no longer limited to the restrictions of locations.

I bought my first car (my only car for that matter) from a dealer that posted their inventory online. So, thanks to this second hand used car website, I was able to find myself and buy my very own car.

Continue reading »

mysql: Multiple Table Query, Output into File

Check out this article about mysql: Multiple Table Query, Output into File. Please tell me what you think about it. You can contact me anytime!

Got a request from the boss today to extract all users plus their contact numbers from the Paging server

Server is a Red Hat Enterprise Linux AS release 4, running LAMP.

The data needed are located in several tables, so we need to query all relevant tables in the databse:

mysql> SELECT users.username, users.emailaddress, user_services.current_service FROM users, user_services WHERE users.username=user_services.username

The statement above queries two tables – users and user_services, as show from the expressin ‘FROM users, user_services’. The record in users table that information is required are in the username and emailaddress record. On user_services, it’s current_services. The WHERE sets the limit condition.

To send that output to a file, we use the INTO OUTFILE ‘</path/to/file>’.

So, that’s

mysql> SELECT users.username, users.emailaddress, user_services.current_service FROM users, user_services WHERE users.username=user_services.username INTO OUTFILE ‘/tmp/tempfile.txt’