Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem with AddDBParam('-lop_end','or')

Featured Replies

  • Newbies

hi there !!

I have a problem with AddDBParam('-lop_end','or'). Can anybody give me some piece of code. I'm doing that in this way:

//version 1

for($i=0; $i<count($field_value); $i++){

$this->query->AddDBParam('-lop','or');

$this->query->AddDBParam($filed_name[$i],$field_value[$i]);

}

$data = $this->query->FMFind();

//version 2

$this->query->AddDBParam('-lop','or');

for($i=0; $i<count($field_value); $i++){

$this->query->AddDBParam($filed_name[$i],$field_value[$i]);

}

$data = $this->query->FMFind();

but it's doesn't work :

thanx for any help !!

I'm not sure if this is your actual problem as it may just be a typo with your post, but you have a syntax error in your 'for' loop. You have a variable $filed_name that I'm assuming should be $field_name. You don't show in your code where this variable has been set or what its value is.

Cheers,

Kevin Futter

  • Author
  • Newbies

i know that name of variable is different, but it's not a problem...I created class which i'm using to add/update/delete records from different layouts. I will show you whole function:

//code

function getInfo($field_name, $field_value, $sortfield='', $sort_type='', $operator=''){

unset($this->vars);

$this->vars = array();

if(!empty($sortfield)){

$this->query->AddSortParam($sortfield,$sort_type);

}

$this->query->AddDBParam('-lop','or');

for($z=0; $z<count($field_name); $z++){

$this->query->AddDBParam($field_name[$z],$field_value[$z]);

}

$data = $this->query->FMFind();

if($data['errorCode']!=0) {

return 0;

}

$j=0;

foreach ($data['data'] as $key => $instanceData){ // numbers of rows in database

for($i=0; $i<count($this->fieldNames); $i++){ // numbers of fields

$this->vars[$this->fieldNames[$i]][$j] = $instanceData[$this->fieldNames[$i]][0];

}

$j++;

}

return 1;

}

//end

basically $field_name and $field_value are arrays

thanks for any help !!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.