mysql_fetch_array
mysql_fetch_array
Hello.
If a user or myself edit the genre, everytime a error is coming:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/htdocs/netjukebox/index.php on line 653
regards
Michael
If a user or myself edit the genre, everytime a error is coming:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/htdocs/netjukebox/index.php on line 653
regards
Michael
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
I have now tested it on two different setups, and can't reproduce the problem:
Apache 2.0.59
PHP 4.4.7
MySQL 4.0.27
Apache 2.2
PHP 5.1.6
MySQL 5.0.25a
Do you have a completed other setup?
Do you always get the error when pressing save in "Select genre"?
Did you have the problem in previous versions of netjukebox?
Apache 2.0.59
PHP 4.4.7
MySQL 4.0.27
Apache 2.2
PHP 5.1.6
MySQL 5.0.25a
Do you have a completed other setup?
Do you always get the error when pressing save in "Select genre"?
Did you have the problem in previous versions of netjukebox?
wbartels wrote:Thanks for the test account.
I don't see any problem with changing a genre.
In what situation did you get the error?
You don't see any problems? mmh. I tried it again, and i get the error every time.
I go for example to (a), take the first artist, click the box and then edit. after saving i get the error.
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
Also changed "a+p" "links-rechts" to "ska" without any problem.wp180 wrote:wbartels wrote:Thanks for the test account.
I don't see any problem with changing a genre.
In what situation did you get the error?
You don't see any problems? mmh. I tried it again, and i get the error every time.
I go for example to (a), take the first artist, click the box and then edit. after saving i get the error.
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
I found the problem, In JavaScript location you may not escape & in &
To fix it change code block 156-161 in genre.php from:
to:
I will come up shortly with a fixed version of netjukebox.
To fix it change code block 156-161 in genre.php from:
Code: Select all
$url = 'index.php?action=view2';
$url.= ($artist == '') ? '&genre_id=' . rawurlencode($genre_id) : '&artist=' . rawurlencode($artist);
$url.= '&order=' . rawurlencode($order);
$url.= '&sort=' . rawurlencode($sort);
echo '<script type="text/javascript">window.location="' . $url . '";</script>';
exit();
Code: Select all
$url = 'index.php?action=view2';
$url.= ($artist == '') ? '&genre_id=' . rawurlencode($genre_id) : '&artist=' . rawurlencode($artist);
$url.= '&order=' . rawurlencode($order);
$url.= '&sort=' . rawurlencode($sort);
echo '<script type="text/javascript">window.location="' . $url . '";</script>';
exit();