visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

ALL :: ZONES :: Global and rdbms: is it limitation of php?


By: PHP newbee U.S.A.  Date: 20/04/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
Hi Experts,
i have noticed tht declaring a global variable in php is hard comparing with other tools. Is this a limitation in php?
Further, there is no rdbms in php(hope i am right!?!?)
can i have a forign key w/o this relation? huv it is possible?
pls explain...

By: VGR Date: 20/04/2003 16:45:00 English  Type : Answer
1) wrong
2) wrong

Happy ? :D

----- global variable :
<?php
$toto=1;
echo "$toto is a global variable
";
include('someinclude.inc.php'); // $toto is accessible directly in that include
?>

The ***only*** place where globals are not-really-globals (and this annopys me at the uttermost level of exasperation since the beginning) is if functions are declared in the global scope.
so a function in the file above wanting to access globall variable $toto would have to be declared like this :
function foofunc($par) {
GLOBAL $toto;
echo "toto is know as value '$toto' here also
";
} // foofunc procedure


Please note also that nowadays people begin to use syntax $GLOBALS[]-something or $_SERVER[]-like ; see documentation at <A HREF="http://www.php.net">www.php.net</a>, type in "globals"

-------- no RDBMS in PHP
Sure : PHP supports natively (not via OCI or ODBC or OleDB :D :D :D)
dBase
dbm
dbx
DB++
FilePro
Informix
Interbase
Ingres II
mSql
MySql
Oracle
PostGreSql
Sybase


------- foreign keys, even in MySql 3.23.44+ (InnoDB tables) :
<A HREF="http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html">http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html</a>
By: bljak Date: 21/04/2003 20:36:00 English  Type : Comment
msSql also ... :)

//bljak
By: VGR Date: 21/04/2003 21:33:00 English  Type : Comment
yes yes, sure, but I only dare to write about things I know ;-)

Do register to be able to answer

EContact
browser fav
page generated in 1072.097060 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page