Jump to content
Fórum Script Brasil
  • 0

Error En Php


spectrum2004

Question

tengo este error en el archivo database.php

Fatal error: Call to undefined function ibase_timefmt() in C:\AppServ\www\phpfact\includes\database.php on line 8

archivo :

<?php

function open_database()

{

$GLOBALS["dbh"] = ibase_pconnect($GLOBALS["server"] . ":" . $GLOBALS["database"], $GLOBALS["user_db"],

$GLOBALS["password_db"]) or die(ibase_errmsg());

ibase_timefmt("%d/%m/%Y", IBASE_TIMESTAMP);

}

function close_database()

{

ibase_close($GLOBALS["dbh"]);

}

function get_next_val($tabla, $campo)

{

$query = "SELECT MAX(CAST(" . $campo . " AS INT)) AS MAXIMO FROM " . $tabla;

$result = execute_query($GLOBALS["dbh"], $query);

$row = ibase_fetch_row($result);

$maximo = $row[0];

free_result($result);

return $maximo + 1;

}

function execute_query($dbh, $sql)

{

/**** Esto hay que cambiarlo, quizas por una funcion que genere las consultas */

$sql = str_replace("''", "NULL", $sql);

return ibase_query($dbh, $sql);

}

function fetch_object($result)

{

return ibase_fetch_object($result);

}

function free_result($result)

{

ibase_free_result($result);

}

?>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.5k
×
×
  • Create New...