Doesn't work in PostgreSQL.

ardas - January 16, 2007 - 14:47
Project:Session Limit
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Greetings.

I'm using your module for my project which is working with PostgreSQL. I have a problem in DELETE SQL statement when removing a selected session id:

<?php
  db_query
('DELETE from {sessions} where sid = "%s"',$edit['sid']);
?>

It is not allowed to wrap string constants with "" in PostgreSQL. You should use '' instead. The fix is as follows:
<?php
  db_query
("DELETE from {sessions} where sid = '%s'",$edit['sid']);
?>

I did it for myself and this was tested in both MySQL and PostgreSQL. Please, fix this in your module for HEAD and 4.7.

Thank you.

#1

Cainan - February 23, 2007 - 20:59
Status:active» fixed

I have added your fix in the 5.X code release

#2

Anonymous - March 9, 2007 - 21:02
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.