Try like this
SELECT t1.* FROM
table1 t1
JOIN table2 t2 ON(t2.state_id = t1.state AND t2.city!='')
More Related Contents:
- How to update multiple MySQL table entries with different id?
- Can’t insert data into mysql database using PHP [closed]
- which is better every user have a table or just a row [closed]
- How chnage image size before uploaded on server [closed]
- PHP PDO: charset, set names?
- How to retract a salted password from the Database and auth user?
- What is the difference between MySQL, MySQLi and PDO? [closed]
- Fatal error: [] operator not supported for strings
- Fetching data from MySQL database to HTML dropdown list
- How to solve General error: 2006 MySQL server has gone away
- How to insert an array into a single MySQL Prepared statement w/ PHP and PDO
- ini_set, set_time_limit, (max_execution_time) – not working
- Find Point in polygon PHP
- phpmyadmin automatic logout time
- unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING error [duplicate]
- Setting a connect timeout with PDO
- How to build a JSON array from mysql database
- How to display a date as iso 8601 format with PHP
- How to generate unique id in MySQL?
- Join two tables with comma separated values
- Fatal error: Call to undefined method mysqli_stmt::fetch_array() [duplicate]
- adding 30 minutes to datetime php/mysql
- Remotely connecting to a MySQL database
- Create table with PHP and populate from MySQL
- mysql_connect VS mysql_pconnect [closed]
- Strange problem with the length of the field gotten from database [duplicate]
- Can I detect and handle MySQL Warnings with PHP?
- mysql_fetch_array skipping first row
- 500 Internal Server Error?
- mysql count into PHP variable