• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Firebird Driver Finally!!

#1
[eluser]Carlos G[/eluser]
I have developed a FirebirdDB driver for Codeigniter 2.0 +

you can get it at GitHub here: [url=https://github.com/cgarciagl/Firebird-for-Codeigniter[/url]

**moved to GitHUB**

feel free to provide feedback Smile

Cheers

#2
[eluser]OliverHR[/eluser]
Excellent Carlos.

Felicidades Carlos en lo particular no he usado mucho Interbase o Firebird, pero por cuestiones de trabajo hace casi un año que tengo que administrar una base de datos de firebird, así que abra que probar este driver. Gracias por el aporte.

#3
[eluser]wiredesignz[/eluser]
Good work man. Your efforts are much appreciated.

#4
[eluser]janogarcia[/eluser]
It's been more than 2 years since the last time I had to work with a Firebird database... And now I'll be required to use it again for a new project.

Just in time. Gracias Carlos!

#5
[eluser]Capt. Kirk[/eluser]
Finally!! My pain is going to end! :lol:

Serious... I have used a modification that I found on the internet that has allowed me to make selects in this database, wich has served me well so far. However, I had now to write some code to make insertions and it isn't working. Will this driver of yours work on CI 1.72 or it is designed for 2.0 only? By the way, when this new version will ever be launched anyway?

Thanks for the help.

#6
[eluser]Unknown[/eluser]
Thank you Carlos i would try it and let you know about it as of in searching of this so long.

#7
[eluser]Capt. Kirk[/eluser]
Hey guys! What's up?

Carlos, I have updated the driver of my application with yours and guess what? It works! :cheese: Thank you for the good work!!

However, I'm having throuble with blob type fields. The select returns a strange data like "0x000000170000029e", instead of my saved text.

Can you help me?

Thanks.

#8
[eluser]Carlos G[/eluser]
[quote author="Capt. Kirk" date="1288219332"]Hey guys! What's up?

Carlos, I have updated the driver of my application with yours and guess what? It works! :cheese: Thank you for the good work!!

However, I'm having throuble with blob type fields. The select returns a strange data like "0x000000170000029e", instead of my saved text.

Can you help me?

Thanks.[/quote]

Glad to hear that it works for you :-)

could you provide a test case for this issue?? Firebird Version and the type and subtype of the blob field ??

#9
[eluser]Capt. Kirk[/eluser]
Firebird 2.1.2
Blob field = MESS_TEXTO BLOB SUB_TYPE 1 CHARACTER SET NONE

Code:
if (!isset($_POST['mess_id'])):
  $result = $this->mensagens_model->recupera_mensagem($id);
  foreach ($result->result() as $row):
    foreach ($row as $field => $value):
      if (is_date($value)):
        $_POST[strtolower($field)] = dtoc($value);
      else:
        $_POST[strtolower($field)] = $value;
      endif;
    endforeach;
  endforeach;
endif;

print_r($_POST);

Array
(
    [mess_id] => 12
    [mess_destinatario_codigo] => AL    
    [mess_destinatario_nomefant] => Alagoas
    [mess_data_entrega] => 27/10/2010
    [mess_tipo] => E
    [mess_natureza] => Promoção
    [mess_duracao] => 2
    [mess_notificacao] => 0
    [mess_notifica_email] =>
    [mess_imagem] =>
    [mess_texto] => 0x000000150000029e  <- This the Blob field
)

#10
[eluser]Carlos G[/eluser]
Hi, i've updated the driver in bitbucket with a new function to get the blob content of a field.

You just have to pass to the new function the content that is returning now in your field and it will return the real content of the field, in your case with something like this:

Code:
echo $this->db->get_blob($_POST[mess_texto]);

so, update the driver and hope this works for you ;-)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.