I am populating a List in my application. In a different Activity I'm trying to get every "event" to display in a ListView. Therefore I set up a EditText where I enter a city e.g "Hamburg". After the confirm button is clicked the list is supposed to show all the events in Hamburg.
+---------+----------+----------+------------------+
| user_id | name | location | description |
+---------+----------+----------+------------------+
| 5 | Dinner | Hamburg | With the Family |
| 6 | Marriage | Bremen | Alex and Sabrina |
| 7 | Match | Berlin | Hamburg - Hertha |
| 8 | Meeting | Berlin | Alexanderplatz |
| 9 | Cinema | Berlin | FUG2 |
+---------+----------+----------+------------------+
My question, I cannot figure out how to state the SQL-Statement in the PHP document. All i have is:
$result = mysql_query("SELECT * FROM events WHERE location = ':location'") or die(mysql_error());