If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Adv. Poll messes up my other code  XML
Forum Index » Support Forum
Author Message
Anonymous



I installed advanced poll and it works fine.... but my other php that connects to another mysql database is all fucked up

here the site without the poll:
http://www.urbanpeople.net/start3.php

and here exactly the same with following code added:

<?php
include_once "/home/urbanp/urbanpeople.net/poll/booth.php";
echo $php_poll->poll_process(1);
?>

http://www.urbanpeople.net/start2.php

Can anyone help me?
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

At some point there must be a conflict of variable or function names between the scripts.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

What code is on those lines mentioned in the errors?

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Anonymous



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";

ROW 163 $ergebnis=mysql_query($anfrage);
ROW 164 $zeilenanzahl=mysql_num_rows($ergebnis);
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline



Look it up @ www.mysql.com? no idea.

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Anonymous



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

thanks
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

hmm...

try closing the connection, then re-opening it and selecting the right database?

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Anonymous



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.

http://www.urbanpeople.net/start2.php

Thanks for your input
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

No problem, glad you got it working.

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum