spacer
spacer search

SwissCenter

Search
spacer
Main Menu
Home
Documentation + FAQ
Screenshots
Downloads
Forums
Bug Tracking
History
Login
Username

Password

Remember me
?
No account yet?

Locations of visitors to this page

 
Home arrow Forums

SwissCenter Forums  


Missing certificate results in a SQL syntax error - 2008/01/21 07:54 Hi!

Accessing video or series details of a video/series which does not have a assigned certificate, will result in a SQL syntax error:

From the support.log

Code:

 [2008.01.21 13:50:13Page Requested http://fileserver:8080/config/index.php?section=tv&action=display_info&tv_id=4 by client (192.168.1.100) [2008.01.21 13:50:14You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [2008.01.21 13:50:14select name from certificates where cert_id= [2008.01.21 13:50:14Unable to query databaseYou have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1


Can anybody confirm this?
  | | The administrator has disabled public write access.
Re: Missing certificate results in a SQL syntax er - 2008/01/23 16:56 Hi again!

Nobody can confirm?
So I am the only one who gets this error?

Maybe I am doing something wrong ....
  | | The administrator has disabled public write access.
Re: Missing certificate results in a SQL syntax er - 2008/01/23 17:01 I sent this to the admin a day or two ago.

This is a minor change that I made to eliminate an error message it might not be the right solution but there is an issue around this bit.

diff -Naur ../swiss/base/rating.php ../swissbeta/base/rating.php
--- ../swiss/base/rating.php 2008-01-10 20:20:34.690712885 +0000
+++ ../swissbeta/base/rating.php 2008-01-21 19:39:09.492380476 +0000
@@ -50,6 +50,7 @@

function get_cert_name($cert_id)
{
+ if ( $cert_id == NULL ) return NULL ;
return db_value("select name from certificates where cert_id=$cert_id");
}
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: Missing certificate results in a SQL syntax er - 2008/01/23 17:25 I've noticed this for awhile butnever really looked into it since it doesn't seem to cause any side-effects.

Your patch looks reasonable, I'll verify and submit when I find some time.

Thanks
Player : Netgear EVA700 & Popcorn A-100 (081106)
Server : Vista SP1 Home Premium (Simese 2.07, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 1Tb storage.
  | | The administrator has disabled public write access.
Re: Missing certificate results in a SQL syntax er - 2008/01/23 17:31 Zz9pzza, Pernod

Thank you for your feedback.

I will sleep better now...
  | | The administrator has disabled public write access.
spacer
 

Screenshots

www.flickr.com
This is a Flickr badge showing public photos from swisscenter. Make your own badge here.


 

Mambo is Free Software released under the GNU/GPL License.
spacer