The drupal website path is http://domain/v1/v2/v3
and the varials in the path is arg(0)=v1, arg(1)=v2 and arg(2)=v3
So in your sql command in view, you can use like this:
$argument= arg(1);
$view--> build_info['query']="select * from table_name where name='$argument'";
Note:
1. there is no need to add schema name in front of the table name even the schema is not public
2. give alias name to each table and field
SELECT feature.feature_id AS feature_id,
feature.uniquename as feature_uniquename
FROM feature feature
LEFT JOIN featureloc fl ON feature.feature_id = fl.feature_id
LEFT JOIN feature srcf ON fl.srcfeature_id = srcf.feature_id
WHERE srcf.name = '$argument'"
Showing posts with label Drupal. Show all posts
Showing posts with label Drupal. Show all posts
Drupal and Imagecatch problem (Imagecache seems to work only if thefile system is set to private)
The problem is th epath to the image uploaded does not work correctly.
If you set the File system to Private under Administrator>>Files System, th epath problem is sovled. However this solution will affect other Drupal Modules.
I have tried other ways :
- set the permission for pth "/var/www/drupal/sites/default" to 777----doe snot work.
- change the content of .htaccess---doe snot work
"Changed case FILE_DOWNLOADS_PUBLIC to be the same as case FILE_DOWNLOADS_PRIVATE and Voila: It worked!. I am now thinking that this must be a path issue of some sort? Assuming that this is the case, I'm changing the status on this to bug report. Correct me if I'm being premature (or just wrong)."
Source:
- http://drupal.org/node/399790#comment-1428428
- http://drupal.org/node/366177
Subscribe to:
Posts (Atom)
Datatable static image not found on the server
When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...
-
Here is the example of installation of Hadoop on a single machine, UBuntu box in this case. For a simple cluster installation, please refere...
-
Step 1. Install Oracle XE 11g 1. Download Oracle XE (oracle-xe-11.2.0-1.0.x86_64.rpm.zip) from Oracle official website. You need an accoun...
-
Prepare the environment Before configure and compile R source code, I did the following updating of CentOS in order to support R capabilitie...