You are here: $variable fom OCI_RESULT() « All PHP « IT news, forums, messages
$variable fom OCI_RESULT()

Posted by Dave on 09/28/74 11:45

Hello everyone,

I am trying to get the result of a query in a php variable
I wander what's wrong with this code because I don't get a value in $val, I
am sure my select is correct as it returns a value in SQL worksheet for
instance.

<?php

$val = 'test';

print "value = $val <br>";

$con=oci_connect("dave","test",$bd_name);


$sql="select fruit_name from fruits where fruit_id=2";

$stmt=oci_parse($con,$sql);

oci_execute($stmt, oci_default);

oci_fetch($stmt);

$val = oci_result($stmt,0);

oci_free_statement($stmt);

print "value = $val ";

?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация