Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7528233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:19:18+00:00 2026-05-30T04:19:18+00:00

global $adb; $sql = ‘SELECT * from vtiger_invoice where invoiceid = ?’; $result =

  • 0
global $adb;                                

$sql = 'SELECT * from vtiger_invoice where invoiceid = ?';
 $result = $adb->pquery($sql,array($_REQUEST['record']));
 $fecha=$adb->query_result($result,$i,'invoicedate'); 

for($i=0;$i<sizeof($vencimientos);$i++)
{
$date[$i] = date_create($fecha);
date_add($date[$i], date_interval_create_from_date_string($periodicidad.' days'));
$fechafinal = explode(" ",$date[$i]->date);
$splitdate = explode("-",$fechafinal[0]);
$reversedate = array_reverse($splitdate);  
 $fechafinal = implode("-",$reversedate);                    

$pdf->MultiCell(100, $summaryCellHeight , $fechafinal, '', 'L', 0, 1, $summaryLineX+135, $summaryLineY);

$summaryLineY += 4;
}

The problem is this code dont works, or at least $fechafinal didnt get value. When im debugging, all works 100% but when i execute dont works.

I tried put ‘sleeps’ but dont works too.

What can i do? This is strange because i cant find error because when im debugging all works :/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:19:19+00:00Added an answer on May 30, 2026 at 4:19 am

    I think the problem may lie in this line:

    $fechafinal = explode(" ",$date[$i]->date);
    

    A DateTime object doesn’t have any public member date so you wouldn’t get any string there. What you want to use is format().

    With format() You could replace these four lines:

    $fechafinal = explode(" ",$date[$i]->date);
    $splitdate = explode("-",$fechafinal[0]);
    $reversedate = array_reverse($splitdate);  
    $fechafinal = implode("-",$reversedate); 
    

    with:

    $fechafinal = $date[$i]->format('d-m-Y'); // Change the formatting to what you need.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the key from a given value in a multidimensional array. It
global $post; $cat1=get_cat_ID('test1'); $cat2=get_cat_ID('test2'); $myrecentposts = get_posts(array('post_not_in' => get_option('sticky_posts'), 'cat' => -$cat1,-$cat2,'showposts' => 5));
Global scope allows you to use a variable in a function that was defined
Global Windows hooks must be in a DLL because the hook is going to
Is global memory initialized in C++? And if so, how? (Second) clarification: When a
my global.asax looks like this Imports Castle.Windsor Imports Castle.Windsor.Configuration.Interpreters Public Class MvcApplication Inherits System.Web.HttpApplication
Regarding global variable initialization, function hello_testing() { global $conditional_random; if (isset($conditional_random)) { echo foo
Imagine in the Global.asax.cs file I had an instance class as a private field.
I have some global variables in a Python script. Some functions in that script
I'm writing a global error handling module for one of my applications. One of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.