How can I modify this makefile to create proper ARMV7 dylibs?

I need to modify this makefile in order to create proper dylibs for inclusion in my IOS projects. If I just using the dylibs generated without changing this file, I get this error trying to use the dylibs:
ld: warning: ld: warning: ignoring file Undefined symbols for architecture armv7s:
  "_mongo_connect", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
libbson.dylib, file was built for unsupported file format
( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (armv7s):
Undefined symbols for architecture armv7s:
  "_mongo_connect", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
libbson.dylibignoring file
Undefined symbols for architecture armv7s:
  "_mongo_connect", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
libmongoc.dylib, file was built for unsupported file format
( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (armv7s):
Undefined symbols for architecture armv7s:
  "_mongo_connect", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
libmongoc.dylib
Undefined symbols for architecture armv7s:
  "_mongo_connect", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
The makefile:
# MongoDB C Driver Makefile
# Copyright 2009, 2010 10gen Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Version
MONGO_MAJOR=0
MONGO_MINOR=6
MONGO_PATCH=0
BSON_MAJOR=$(MONGO_MAJOR)
BSON_MINOR=$(MONGO_MINOR)
BSON_PATCH=$(MONGO_PATCH)
# Library names
MONGO_LIBNAME=libmongoc
BSON_LIBNAME=libbson
# Standard or posix env.
ENV?=posix
# TODO: add replica set test, cpp test, platform tests, json_test
TESTS=test_auth test_bcon test_bson test_bson_subobject test_count_delete \
  test_cursors test_endian_swap test_errors test_examples \
  test_functions test_gridfs test_helpers \
  test_oid test_resize test_simple test_sizes test_update \
  test_validate test_write_concern test_commands
MONGO_OBJECTS=src/bcon.o src/bson.o src/encoding.o src/gridfs.o src/md5.o src/mongo.o \
src/numbers.o
BSON_OBJECTS=src/bcon.o src/bson.o src/numbers.o src/encoding.o
ifeq ($(ENV),posix)
    TESTS+=test_env_posix test_unix_socket
    MONGO_OBJECTS+=src/env_posix.o
else
    MONGO_OBJECTS+=src/env_standard.o
endif
DYN_MONGO_OBJECTS=$(foreach i,$(MONGO_OBJECTS),$(patsubst %.o,%.os,$(i)))
DYN_BSON_OBJECTS=$(foreach i,$(BSON_OBJECTS),$(patsubst %.o,%.os,$(i)))
# Compile flags
ALL_DEFINES=$(DEFINES)
ALL_DEFINES+=-D_POSIX_SOURCE
CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
DYN_FLAGS:=-fPIC -DMONGO_DLL_BUILD
# Endianness check
endian := $(shell sh -c 'echo "ab" | od -x | grep "6261" >/dev/null && echo little || echo big')
ifeq ($(endian),big)
    ALL_DEFINES+=-DMONGO_BIG_ENDIAN
endif
# Int64 type check
int64:=$(shell ./check_int64.sh $(CC) stdint.h && echo stdint)
ifeq ($(int64),stdint)
    ALL_DEFINES+=-DMONGO_HAVE_STDINT
else
    int64:=$(shell ./check_int64.sh $(CC) unistd.h && echo unistd)
    ifeq ($(int64),unistd)
        ALL_DEFINES+=-DMONGO_HAVE_UNISTD
    endif
endif
$(shell rm header_check.tmp tmp.c)
TEST_DEFINES=$(ALL_DEFINES)
TEST_DEFINES+=-DTEST_SERVER="\"127.0.0.1\""
OPTIMIZATION?=-O3
WARNINGS?=-Wall
DEBUG?=-ggdb
STD?=c99
PEDANTIC?=-pedantic
ALL_CFLAGS=-std=$(STD) $(PEDANTIC) $(CFLAGS) $(OPTIMIZATION) $(WARNINGS) $(DEBUG) $(ALL_DEFINES)
ALL_LDFLAGS=$(LDFLAGS)
# Shared libraries
DYLIBSUFFIX=so
STLIBSUFFIX=a
MONGO_DYLIBNAME=$(MONGO_LIBNAME).$(DYLIBSUFFIX)
MONGO_DYLIB_MAJOR_NAME=$(MONGO_DYLIBNAME).$(MONGO_MAJOR)
MONGO_DYLIB_MINOR_NAME=$(MONGO_DYLIB_MAJOR_NAME).$(MONGO_MINOR)
MONGO_DYLIB_PATCH_NAME=$(MONGO_DYLIB_MINOR_NAME).$(MONGO_PATCH)
MONGO_DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(MONGO_DYLIB_MINOR_NAME) -o $(MONGO_DYLIBNAME) $(ALL_LDFLAGS) $(DYN_MONGO_OBJECTS)
BSON_DYLIBNAME=$(BSON_LIBNAME).$(DYLIBSUFFIX)
BSON_DYLIB_MAJOR_NAME=$(BSON_DYLIBNAME).$(BSON_MAJOR)
BSON_DYLIB_MINOR_NAME=$(BSON_DYLIB_MAJOR_NAME).$(BSON_MINOR)
BSON_DYLIB_PATCH_NAME=$(BSON_DYLIB_MINOR_NAME).$(BSON_PATCH)
BSON_DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(BSON_DYLIB_MINOR_NAME) -o $(BSON_DYLIBNAME) $(ALL_LDFLAGS) $(DYN_BSON_OBJECTS)
# Static libraries
MONGO_STLIBNAME=$(MONGO_LIBNAME).$(STLIBSUFFIX)
BSON_STLIBNAME=$(BSON_LIBNAME).$(STLIBSUFFIX)
# Overrides
kernel_name := $(shell sh -c 'uname -s 2>/dev/null || echo not')
ifeq ($(kernel_name),SunOS)
    ALL_LDFLAGS+=-ldl -lnsl -lsocket
    INSTALL_CMD=cp -r
    MONGO_DYLIB_MAKE_CMD=$(CC) -G -o $(MONGO_DYLIBNAME) -h $(MONGO_DYLIB_MINOR_NAME) $(ALL_LDFLAGS)
    BSON_DYLIB_MAKE_CMD=$(CC) -G -o $(BSON_DYLIBNAME) -h $(BSON_DYLIB_MINOR_NAME) $(ALL_LDFLAGS)
endif
ifeq ($(kernel_name),Darwin)
    ALL_CFLAGS+=-std=$(STD) $(CFLAGS) $(OPTIMIZATION) $(WARNINGS) $(DEBUG) $(ALL_DEFINES)
    DYLIBSUFFIX=dylib
    MONGO_DYLIB_MINOR_NAME=$(MONGO_LIBNAME).$(DYLIBSUFFIX).$(MONGO_MAJOR).$(MONGO_M INOR)
    MONGO_DYLIB_MAJOR_NAME=$(MONGO_LIBNAME).$(DYLIBSUFFIX).$(MONGO_MAJOR)
    MONGO_DYLIB_MAKE_CMD=$(CC) -shared -Wl,-install_name,$(MONGO_DYLIB_MINOR_NAME) -o $(MONGO_DYLIBNAME) $(ALL_LDFLAGS) $(DYN_MONGO_OBJECTS)
    BSON_DYLIB_MINOR_NAME=$(BSON_LIBNAME).$(DYLIBSUFFIX).$(BSON_MAJOR).$(BSON_MINOR )
    BSON_DYLIB_MAJOR_NAME=$(BSON_LIBNAME).$(DYLIBSUFFIX).$(BSON_MAJOR)
    BSON_DYLIB_MAKE_CMD=$(CC) -shared -Wl,-install_name,$(BSON_DYLIB_MINOR_NAME) -o $(BSON_DYLIBNAME) $(ALL_LDFLAGS) $(DYN_BSON_OBJECTS)
endif
# Installation
ifeq ($(kernel_name),SunOS)
    INSTALL?=cp -r
endif
INSTALL?= cp -a
INSTALL_INCLUDE_PATH?=/usr/local/include
INSTALL_LIBRARY_PATH?=/usr/local/lib
# TARGETS
all: $(MONGO_DYLIBNAME) $(BSON_DYLIBNAME) $(MONGO_STLIBNAME) $(BSON_STLIBNAME)
# Dependency targets. Run 'make deps' to generate these.
bcon.o: src/bcon.c src/bcon.h src/bson.h
bson.o: src/bson.c src/bson.h src/encoding.h
encoding.o: src/encoding.c src/bson.h src/encoding.h
env_standard.o: src/env_standard.c src/env.h src/mongo.h src/bson.h
env_posix.o: src/env_posix.c src/env.h src/mongo.h src/bson.h
gridfs.o: src/gridfs.c src/gridfs.h src/mongo.h src/bson.h
md5.o: src/md5.c src/md5.h
mongo.o: src/mongo.c src/mongo.h src/bson.h src/md5.h src/env.h
numbers.o: src/numbers.c
$(MONGO_DYLIBNAME): $(DYN_MONGO_OBJECTS)
    $(MONGO_DYLIB_MAKE_CMD)
$(MONGO_STLIBNAME): $(MONGO_OBJECTS)
    $(AR) -rs $@ $(MONGO_OBJECTS)
$(BSON_DYLIBNAME): $(DYN_BSON_OBJECTS)
    $(BSON_DYLIB_MAKE_CMD)
$(BSON_STLIBNAME): $(BSON_OBJECTS)
    $(AR) -rs $@ $(BSON_OBJECTS)
install:
    mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
    $(INSTALL) src/mongo.h src/bson.h $(INSTALL_INCLUDE_PATH)
    $(INSTALL) $(MONGO_DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(MONGO_DYLIB_PATCH_NAME)
    $(INSTALL) $(BSON_DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(BSON_DYLIB_PATCH_NAME)
    cd $(INSTALL_LIBRARY_PATH) && ln -sf $(MONGO_DYLIB_PATCH_NAME) $(MONGO_DYLIB_MINOR_NAME)
    cd $(INSTALL_LIBRARY_PATH) && ln -sf $(BSON_DYLIB_PATCH_NAME) $(BSON_DYLIB_MINOR_NAME)
    cd $(INSTALL_LIBRARY_PATH) && ln -sf $(MONGO_DYLIB_MINOR_NAME) $(MONGO_DYLIBNAME)
    cd $(INSTALL_LIBRARY_PATH) && ln -sf $(BSON_DYLIB_MINOR_NAME) $(BSON_DYLIBNAME)
    $(INSTALL) $(MONGO_STLIBNAME) $(INSTALL_LIBRARY_PATH)
    $(INSTALL) $(BSON_STLIBNAME) $(INSTALL_LIBRARY_PATH)
scan-build: clean
    scan-build -V -v make
test: $(TESTS)
    sh runtests.sh
valgrind: $(TESTS)
    sh runtests.sh -v
docs:
    python docs/buildscripts/docs.py
clean:
    rm -rf src/*.o src/*.os test/*.o test/*.os test_* .scon* config.log
clobber: clean
    rm -rf $(MONGO_DYLIBNAME) $(MONGO_STLIBNAME) $(BSON_DYLIBNAME) $(BSON_STLIBNAME) docs/html docs/source/doxygen
deps:
    $(CC) -MM -DMONGO_HAVE_STDINT src/*.c
32bit:
    $(MAKE) CFLAGS="-m32" LDFLAGS="-pg"
test_%: test/%_test.c test/test.h $(MONGO_STLIBNAME)
    $(CC) -o $@ -L. -Isrc $(TEST_DEFINES) $(ALL_LDFLAGS) $< $(MONGO_STLIBNAME)
%.o: %.c
    $(CC) -o $@ -c $(ALL_CFLAGS) $<
%.os: %.c
    $(CC) -o $@ -c $(ALL_CFLAGS) $(DYN_FLAGS) $<
.PHONY: 32bit all clean clobber deps docs install test valgrind

Hi Petar,
Thanks for your answer. No doubt that we could solve the issue using on of the way you suggested.
However, even though I had the evdre issue right after applying time dimension modifications, it occurs that the evdre issue was not due to time dimension modifications. I tested it better and I can tell that using "total" as a level works.
Best regards,
Ludovic

Similar Messages

  • When trying to log in with my primary Apple ID and password, I am continuously asked for my pass word without being able to log in. How can I solve this issue, without creating a new Apple ID?

    When trying to log in with my primary Apple ID and password, I am continuously asked for my pass word without being able to log in. How can I solve this issue, without creating a new Apple ID?

    Chewning wrote:
    I saved some of my music to a Cloud I can't access. Now, they show up as "Purchased" in iTunes, and I'm not given the option of re-downloading OR repurchasing them.
    Music purchased from the iTunes store is not stored in your personal iCloud account, and an iCloud account is not required to redownload them.  You should be able to redownload them as explained here: http://support.apple.com/kb/ht2519.  If you are unable to, contact iTunes store support for assistance by going to https://expresslane.apple.com ; click ‘iTunes', and then 'iTunes Store', then 'Purchases, Billing & Redemption'.

  • How can I modify this script to return only certain rows of my mySQL table?

    Hi there,
    I have a php script that accesses a mySQL database and it was generated out of the Flex Builder wizard automatically. The script works great and there are no problems with it. It allows me to perform CRUD on a table by calling it from my Flex app. and it retrieves all the data and puts it into a nice MXML format.
    My question, currently when I call "findAll" to retrieve all the data in the table, well, it retrieves ALL the rows in the table. That's fine, but my table is starting to grow really large with thousands of rows.
    I want to modify this script so that I can pass a variable into it from Flex so that it only retrieves the rows that match the "$subscriber_id" variable that I pass. In this way the results are not the entire table's data, only the rows that match 'subscriber_id'.
    I know how to pass a variable from Flex into php and the code on the php side to pick it up would look like this:
    $subscriberID = $_POST['subscriberID'];
    Can anyone shed light as to the proper code modification in "findAll" which will take my $subscriberID variable and compare it to the 'subscriber_id' field and then only return those rows that match? I think it has something to do with lines 98 to 101.
    Any help is appreciated.
    <?php
    require_once(dirname(__FILE__) . "/2257safeDBconn.php");
    require_once(dirname(__FILE__) . "/functions.inc.php");
    require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
    * This is the main PHP file that process the HTTP parameters,
    * performs the basic db operations (FIND, INSERT, UPDATE, DELETE)
    * and then serialize the response in an XML format.
    * XmlSerializer uses a PEAR xml parser to generate an xml response.
    * this takes a php array and generates an xml according to the following rules:
    * - the root tag name is called "response"
    * - if the current value is a hash, generate a tagname with the key value, recurse inside
    * - if the current value is an array, generated tags with the default value "row"
    * for example, we have the following array:
    * $arr = array(
    *      "data" => array(
    *           array("id_pol" => 1, "name_pol" => "name 1"),
    *           array("id_pol" => 2, "name_pol" => "name 2")
    *      "metadata" => array(
    *           "pageNum" => 1,
    *           "totalRows" => 345
    * we will get an xml of the following form
    * <?xml version="1.0" encoding="ISO-8859-1"?>
    * <response>
    *   <data>
    *     <row>
    *       <id_pol>1</id_pol>
    *       <name_pol>name 1</name_pol>
    *     </row>
    *     <row>
    *       <id_pol>2</id_pol>
    *       <name_pol>name 2</name_pol>
    *     </row>
    *   </data>
    *   <metadata>
    *     <totalRows>345</totalRows>
    *     <pageNum>1</pageNum>
    *   </metadata>
    * </response>
    * Please notice that the generated server side code does not have any
    * specific authentication mechanism in place.
    * The filter field. This is the only field that we will do filtering after.
    $filter_field = "subscriber_id";
    * we need to escape the value, so we need to know what it is
    * possible values: text, long, int, double, date, defined
    $filter_type = "text";
    * constructs and executes a sql select query against the selected database
    * can take the following parameters:
    * $_REQUEST["orderField"] - the field by which we do the ordering. MUST appear inside $fields.
    * $_REQUEST["orderValue"] - ASC or DESC. If neither, the default value is ASC
    * $_REQUEST["filter"] - the filter value
    * $_REQUEST["pageNum"] - the page index
    * $_REQUEST["pageSize"] - the page size (number of rows to return)
    * if neither pageNum and pageSize appear, we do a full select, no limit
    * returns : an array of the form
    * array (
    *           data => array(
    *                array('field1' => "value1", "field2" => "value2")
    *           metadata => array(
    *                "pageNum" => page_index,
    *                "totalRows" => number_of_rows
    function findAll() {
         global $conn, $filter_field, $filter_type;
          * the list of fields in the table. We need this to check that the sent value for the ordering is indeed correct.
         $fields = array('id','subscriber_id','lastName','firstName','birthdate','gender');
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         $order = "";
         if (@$_REQUEST["orderField"] != "" && in_array(@$_REQUEST["orderField"], $fields)) {
              $order = "ORDER BY " . @$_REQUEST["orderField"] . " " . (in_array(@$_REQUEST["orderDirection"], array("ASC", "DESC")) ? @$_REQUEST["orderDirection"] : "ASC");
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //get the page number, and the page size
         $pageNum = (int)@$_REQUEST["pageNum"];
         $pageSize = (int)@$_REQUEST["pageSize"];
         //calculate the start row for the limit clause
         $start = $pageNum * $pageSize;
         //construct the query, using the where and order condition
         $query_recordset = "SELECT id,subscriber_id,lastName,firstName,birthdate,gender FROM `modelName` $where $order";
         //if we use pagination, add the limit clause
         if ($pageNum >= 0 && $pageSize > 0) {     
              $query_recordset = sprintf("%s LIMIT %d, %d", $query_recordset, $start, $pageSize);
         $recordset = mysql_query($query_recordset, $conn);
         //if we have rows in the table, loop through them and fill the array
         $toret = array();
         while ($row_recordset = mysql_fetch_assoc($recordset)) {
              array_push($toret, $row_recordset);
         //create the standard response structure
         $toret = array(
              "data" => $toret,
              "metadata" => array (
                   "totalRows" => $totalrows,
                   "pageNum" => $pageNum
         return $toret;
    * constructs and executes a sql count query against the selected database
    * can take the following parameters:
    * $_REQUEST["filter"] - the filter value
    * returns : an array of the form
    * array (
    *           data => number_of_rows,
    *           metadata => array()
    function rowCount() {
         global $conn, $filter_field, $filter_type;
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //create the standard response structure
         $toret = array(
              "data" => $totalrows,
              "metadata" => array()
         return $toret;

    Hi there,
    I have a php script that accesses a mySQL database and it was generated out of the Flex Builder wizard automatically. The script works great and there are no problems with it. It allows me to perform CRUD on a table by calling it from my Flex app. and it retrieves all the data and puts it into a nice MXML format.
    My question, currently when I call "findAll" to retrieve all the data in the table, well, it retrieves ALL the rows in the table. That's fine, but my table is starting to grow really large with thousands of rows.
    I want to modify this script so that I can pass a variable into it from Flex so that it only retrieves the rows that match the "$subscriber_id" variable that I pass. In this way the results are not the entire table's data, only the rows that match 'subscriber_id'.
    I know how to pass a variable from Flex into php and the code on the php side to pick it up would look like this:
    $subscriberID = $_POST['subscriberID'];
    Can anyone shed light as to the proper code modification in "findAll" which will take my $subscriberID variable and compare it to the 'subscriber_id' field and then only return those rows that match? I think it has something to do with lines 98 to 101.
    Any help is appreciated.
    <?php
    require_once(dirname(__FILE__) . "/2257safeDBconn.php");
    require_once(dirname(__FILE__) . "/functions.inc.php");
    require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
    * This is the main PHP file that process the HTTP parameters,
    * performs the basic db operations (FIND, INSERT, UPDATE, DELETE)
    * and then serialize the response in an XML format.
    * XmlSerializer uses a PEAR xml parser to generate an xml response.
    * this takes a php array and generates an xml according to the following rules:
    * - the root tag name is called "response"
    * - if the current value is a hash, generate a tagname with the key value, recurse inside
    * - if the current value is an array, generated tags with the default value "row"
    * for example, we have the following array:
    * $arr = array(
    *      "data" => array(
    *           array("id_pol" => 1, "name_pol" => "name 1"),
    *           array("id_pol" => 2, "name_pol" => "name 2")
    *      "metadata" => array(
    *           "pageNum" => 1,
    *           "totalRows" => 345
    * we will get an xml of the following form
    * <?xml version="1.0" encoding="ISO-8859-1"?>
    * <response>
    *   <data>
    *     <row>
    *       <id_pol>1</id_pol>
    *       <name_pol>name 1</name_pol>
    *     </row>
    *     <row>
    *       <id_pol>2</id_pol>
    *       <name_pol>name 2</name_pol>
    *     </row>
    *   </data>
    *   <metadata>
    *     <totalRows>345</totalRows>
    *     <pageNum>1</pageNum>
    *   </metadata>
    * </response>
    * Please notice that the generated server side code does not have any
    * specific authentication mechanism in place.
    * The filter field. This is the only field that we will do filtering after.
    $filter_field = "subscriber_id";
    * we need to escape the value, so we need to know what it is
    * possible values: text, long, int, double, date, defined
    $filter_type = "text";
    * constructs and executes a sql select query against the selected database
    * can take the following parameters:
    * $_REQUEST["orderField"] - the field by which we do the ordering. MUST appear inside $fields.
    * $_REQUEST["orderValue"] - ASC or DESC. If neither, the default value is ASC
    * $_REQUEST["filter"] - the filter value
    * $_REQUEST["pageNum"] - the page index
    * $_REQUEST["pageSize"] - the page size (number of rows to return)
    * if neither pageNum and pageSize appear, we do a full select, no limit
    * returns : an array of the form
    * array (
    *           data => array(
    *                array('field1' => "value1", "field2" => "value2")
    *           metadata => array(
    *                "pageNum" => page_index,
    *                "totalRows" => number_of_rows
    function findAll() {
         global $conn, $filter_field, $filter_type;
          * the list of fields in the table. We need this to check that the sent value for the ordering is indeed correct.
         $fields = array('id','subscriber_id','lastName','firstName','birthdate','gender');
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         $order = "";
         if (@$_REQUEST["orderField"] != "" && in_array(@$_REQUEST["orderField"], $fields)) {
              $order = "ORDER BY " . @$_REQUEST["orderField"] . " " . (in_array(@$_REQUEST["orderDirection"], array("ASC", "DESC")) ? @$_REQUEST["orderDirection"] : "ASC");
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //get the page number, and the page size
         $pageNum = (int)@$_REQUEST["pageNum"];
         $pageSize = (int)@$_REQUEST["pageSize"];
         //calculate the start row for the limit clause
         $start = $pageNum * $pageSize;
         //construct the query, using the where and order condition
         $query_recordset = "SELECT id,subscriber_id,lastName,firstName,birthdate,gender FROM `modelName` $where $order";
         //if we use pagination, add the limit clause
         if ($pageNum >= 0 && $pageSize > 0) {     
              $query_recordset = sprintf("%s LIMIT %d, %d", $query_recordset, $start, $pageSize);
         $recordset = mysql_query($query_recordset, $conn);
         //if we have rows in the table, loop through them and fill the array
         $toret = array();
         while ($row_recordset = mysql_fetch_assoc($recordset)) {
              array_push($toret, $row_recordset);
         //create the standard response structure
         $toret = array(
              "data" => $toret,
              "metadata" => array (
                   "totalRows" => $totalrows,
                   "pageNum" => $pageNum
         return $toret;
    * constructs and executes a sql count query against the selected database
    * can take the following parameters:
    * $_REQUEST["filter"] - the filter value
    * returns : an array of the form
    * array (
    *           data => number_of_rows,
    *           metadata => array()
    function rowCount() {
         global $conn, $filter_field, $filter_type;
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //create the standard response structure
         $toret = array(
              "data" => $totalrows,
              "metadata" => array()
         return $toret;

  • How can i modify this code in BI?

    hi friends,
    suppose i have data in infosource with deffirent customers.
    like from usa,germany,uk.
    i created 3 cubes and uploaded records corresponding countries.
    i have written code like this in 3.5
    loop at data_package.
    if data_package-/bic/zcustomer <> 'usa'.
    delete data_package.
    endif.
    endloop.
    same logic i need to write in BI 7.0 now where can i write this logic, what modifications i need to change for BI 7.0
    regards
    suneel.

    Hi,
    Check this link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
    I guess, you just need to change the DATA_PACKAGE to the new naming convention.
    Hope this helps.
    PB

  • How can I modify this to process 80,000 records at a time until finish.

    Hello it's me again -
    Without using a rownum limit in my cursor declare my record-set is around 10 million records. This causes problems within our environment. Is there a way I can loop the following code and only do 80,000 at a time.
    1 process 80,000
    2. process next 80,000.
    How would I redeclare the cursor in a loop and grab the next 80,000?
    Thanks again
    Steve
    SET SERVEROUTPUT ON
    DECLARE
    CURSOR vt_mlr_cursor IS Select master_key, tn, user2 from vt_mlr Where user2 is not null and rownum < 80001;
    USERFIELD VARCHAR2(100);
    R_count NUMBER := 0;
    Field1 VARCHAR2(20);
    Field2 VARCHAR2(20);
    key VARCHAR2(10);
    phone VARCHAR2(11);
    BEGIN
    FOR vt_mlr_record IN vt_mlr_cursor
    LOOP
    BEGIN
         key := vt_mlr_record.master_key;
         phone     := vt_mlr_record.tn;
         USERFIELD := vt_mlr_record.user2;
         Field1 := SUBSTR(vt_mlr_record.user2,12,4);
         Field2 := SUBSTR(vt_mlr_record.user2,28,4);
              UPDATE vt_mlr
              SET
              line_medr = Field1,
              line_aidr = Field2
              WHERE
              master_key = vt_mlr_record.master_key;
              R_count := R_count + 1;
         EXCEPTION
         when others then
         Insert into temp_reject (REJECT_KEY, REJECT_TN, REJECT_VALUE) VALUES
         (key, phone, 'USER2 ' || USERFIELD );
         R_count := R_count - 1;
    END;
    END LOOP;
         commit;
         EXCEPTION
         when others then
         DBMS_OUTPUT.PUT_LINE('Error code ' || sqlcode || ' Error desc' || SUBSTR(sqlerrm,1,200));
    END;

    Add a "last_update" or "modified" column to your table.
    Then do this:
    declare
    CURSOR vt_mlr_cursor IS
       select master_key, tn, user2
       from vt_mlr
       where user2 is not null and rownum < 80001
             and modified != 'Y'
    (or)
             and last_update < begin_date ;
       begin_date constant date := sysdate ;
    begin
      update vt_mlr
         set line_medr = Field1,
             line_aidr = Field2,
             modified = 'Y'
    (or)
             last_update = sysdate

  • How can I modify Time dimension to create a Top member above year members ?

    Hi experts,
    I would like to modify Time dimension to add a Top member above year members.
    I already did a test:
    I added a member in Time dimension which is the parent of all year members. I granted it these property values:
    - ID = TOTAL
    - EVDESCRIPTION = Total
    - LEVEL = TOTAL
    - HLEVEL = 1 (and I added 1 to all the other members)
    - TIMEID = 10000001
    All other properties were left blank for this member.
    I processed the dimension. It went well. But when I tried an evdre in BPC excel it failed.
    Any idea of something missing ?
    I am working on SAP BPC MS 7 SP4
    Thanks for your help
    Ludovic

    Hi Petar,
    Thanks for your answer. No doubt that we could solve the issue using on of the way you suggested.
    However, even though I had the evdre issue right after applying time dimension modifications, it occurs that the evdre issue was not due to time dimension modifications. I tested it better and I can tell that using "total" as a level works.
    Best regards,
    Ludovic

  • How can I modify this code to display an image in an applet?

    Sorry, I'm almost positive this is absolutely incorrect, but here is what I have so far:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class Blackberry extends JApplet implements ActionListener
         Image image;
        public void init()
            //image = getImage(getDocumentBase(), "bluespace.png");
            try { image = ImageIO.read(new File("bluespace.png")); }
              catch (IOException e) { }
        public void paint(Graphics g)
            g.drawImage(image, 0, 0, this);
    }There are no errors given when run as an applet in Eclipse, it just displays a blank window.

    Here's a small example of a JPanel that draws an image:
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Image;
    import javax.swing.JPanel;
    public class ShowImageJPanel extends JPanel
      private Image image;
      public ShowImageJPanel(Image image)
        this.image = image;
        Dimension size = new Dimension(
            image.getWidth(this),
            image.getHeight(this));
        setPreferredSize(size);
      @Override
      protected void paintComponent(Graphics g)
        super.paintComponent(g);
        if (image != null)
          g.drawImage(image, 0, 0, this);
    }and a JApplet that adds this JPanel into its contentPane:
    import java.awt.Image;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JApplet;
    public class ShowImageApplet extends JApplet
      private static final String IMAGE_PATH = "images/SunSteinSmall.png";
      public void init()
        try
          javax.swing.SwingUtilities.invokeAndWait(new Runnable()
            public void run()
              createGUI();
        catch (Exception e)
          System.err.println("createGUI didn't successfully complete");
      private void createGUI()
        try
          Image image = ImageIO.read(getClass().getResourceAsStream(IMAGE_PATH));
          getContentPane().add(new ShowImageJPanel(image));
        catch (IOException e)
          e.printStackTrace();
    }Here I have a subpackage off of the applet's package called image, and it's filled with Duke images which you can download from here:
    [https://duke.dev.java.net/images/index.html]

  • How can I modify the text of the automatically created emails of WAS 6.40.

    Hi community,
    I have a question. How can I change the text of then email which ist automatically send by the EP6/WAS6.40 when I create a new user. The email displays the message "Dear Sir or Madam, your user xzy was created with the following password xxx."
    How can I modify this text. Where is it located in the Enterprise Portal / WEBAS 6.40 .
    Thank you.
    Best Regards,
    Olaf Reiss

    Not easily or readily available as of now. It WILL be part of the new features in the NetWeaver 04 release. (*This same question was asked in my EP6 certification class one week ago and this is the answer I got.)
    Found this guide in another post...it should help doing what you need manually...
    http://help.sap.com/saphelp_nw04/helpdata/en/33/d494c86203ea40b7b44ddd471baab1/frameset.htm
    Hope this helps!
    CS

  • How can I modify the email who is send when I create a new user in EP6

    Hi community,
    I have a question. How can I change the text of the email which is automatically send by the EP6/WAS6.40 when I create a new user. The email displays the message "Dear Sir or Madam, your user xzy was created with the following password xxx."
    How can I modify this text. Where is it located in the Enterprise Portal / WEBAS 6.40 .
    Thank you.
    Best Regards,
    Olaf Reiss

    Hi,
    Here you can find the required steps on how to change the texts of notification emails:
    http://help.sap.com/saphelp_nw04/helpdata/en/33/d494c86203ea40b7b44ddd471baab1/frameset.htm
    Good luck,
    René

  • I bought Photoshop CS6 Extended(education edition) for Mac. Now ik want to install it on my (new) macbook. I have the product code and serial number. I receive an error code: may be a false copy. How can I install this program?

    In 2012, I bought Photoshop CS6 Extended (education edition) for Mac. Now I want to install it on my new Macbook. I have the correct serial number and product code, but I receive an error message: the software may be a false copy etc....What to do?

    Here is a copy of the error
    This means : Installation failed.
    Verification of the Adobe Software failed
    The product you want to install is no valid Adobe product and seems to be falsified.
    HUgo
    Op 29-aug.-2014, om 23:42 heeft Jeff A Wright <[email protected]> het volgende geschreven:
    I bought Photoshop CS6 Extended(education edition) for Mac. Now ik want to install it on my (new) macbook. I have the product code and serial number. I receive an error code: may be a false copy. How can I install this program?
    created by Jeff A Wright in Downloading, Installing, Setting Up - View the full discussion
    Hugo please turn off your e-mail signature.
    If your serial number is listed as being valid at http://www.adobe.com/ then I would recommend obtaining a fresh copy of the installation files.  You can find details on how to locate your serial number at Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.
    To download a fresh copy of the installation files please see Download CS6 products.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6685617#6685617
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Downloading, Installing, Setting Up by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • When I click to open a PDF it opens in Adobe Photoshop Essentials in stead of Reader.  How can I fix this problem?

    When I click to open a PDF it opens in Photoshop Essentials instead of Reader.  How can I fix this problem?

    I'm using Windows 7 and don't know how to change my file associations.  Can you help me?
          From: ~graffiti <[email protected]>
    To: Keith McMillan <[email protected]>
    Sent: Wednesday, February 18, 2015 4:59 PM
    Subject:  When I click to open a PDF it opens in Adobe Photoshop Essentials in stead of Reader.  How can I fix this problem?
    When I click to open a PDF it opens in Adobe Photoshop Essentials in stead of Reader.  How can I fix this problem?
    created by ~graffiti in Adobe Reader - View the full discussionYou need to change your file associations so that Reader opens pdf files. How you do that depends on what OS you are using. If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7207938#7207938 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7207938#7207938 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Adobe Reader by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • How can i modify the text created by create_text FM

    Hi Gurus,
    How can i change a long text created using create_text FM?
    I couldn find any FM to modify the text!
    Thanks.

    Hello Umit,
    Sorry...I mislead you. the function to edit the content of a long text is SAVE_TEXT and not RENAME_TEXT.
    In SAVE_TEXT FM, fill this information.
    In HEADER parameter, enter your TDOBJECT, TDNAME, TDID, TDSPRAS and TDTITLE information.
    In SAVEMODE_DIRECT parameter put an X value
    In LINES table, put your new content.
    Execute it.
    Confirm it after, using READ_TEXT function.
    Regards,
    Bruno

  • When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder". How can i fix this?

    When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder. How can i fix this problem?

    Anyone can help to advice how to solve this issue ?

  • When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?

    When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?
    All of a sudden I noticed that most of the folders on my computer were no longer using the folder icon, but the generic document icon. I had to manually change back the icon being used by opening Get Info for each folder and copying and pasting the generic folder icon from some folders that remained unchanged. Now whenever I create a New Folder (right click -> "New Folder"), the icon that shows up is the generic document icon (white page with top right corner turned down). And I have to manually change it so it shows up as a folder in Finder or on my desktop. I don't know why or how this switch happened. All of the folders now on my computer look ok, but I need to change the default so when I create a New Folder it uses the correct icon.
    I have also Forced Relaunch of my Finder and rebooted the system. I downloaded Candybar but am not sure what will fix anything, so I haven't proceeded.
    Anyone know how I can do this? Thanks.

    Anyone?

  • I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

Maybe you are looking for