Download & Extend

Using double quote to wrap string in sql query not compatible in PostgreSQL

Project:File (Field) Paths
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Under PostgreSQL, double quote is used to denote a column name, thus this query at line 623 in filefield_paths.module would failed:-

<?php
db_query
('UPDATE {files} SET filename = "%s", filepath = "%s" WHERE fid = %d', $file['filename']['new'], $file['field']['filepath'], $file['field']['fid']);
?>
AttachmentSize
filefield_paths.diff519 bytes

Comments

#1

Status:active» fixed

Fixed and committed to DRUPAL-6--1 and DRUPAL-5.

Thanks for that, as you may have noticed I don't tend to do much with PostgreSQL; I have it available for testing, it just doesn't get used as much as it should.

Cheers,
Deciphered.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here