Below the error message and my php code... I think it's a problem with the database connection
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/.halakah/urbanp/urbanpeople.net/start2.php on line 164
ROW 162 $anfrage="SELECT * FROM Events WHERE Startdate BETWEEN '$datenow' AND '$datenowendofday' AND (StyleEvent_ID LIKE '1' OR StyleEvent_ID LIKE '2') AND CITY_ID LIKE '1' ORDER BY Startdate ASC";
if I put the poll at the bottom of the php page (after all the other code) it won't affect the code. The problem is that after the poll code everything refers to the polls db and not my other database so of course the queries won't work anymore. How can I link it back to the original database after the poll code? I have a "mysql_select_db("up");" statement at the beginning of the new php part but I guess that is not enough. because it will still say that "Table 'uppoll.Places' doesn't exist" where it should be "up.Places"
My php knowledge is limited so if someone knows how to refer back to my original db that would be great
I noticed that I'm using persistent mysql connections which is not really necessary I guess... anyway after the poll code I re-connected to my database using a non-persistent connction and it works fine now.