ALL :: ZONES :: Global and rdbms: is it limitation of php? |
|||
| By: PHP newbee |
Date: 20/04/2003 00:00:00 |
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 | 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 | Type : Comment |
|
| msSql also ... :) //bljak |
|||
| By: VGR | Date: 21/04/2003 21:33:00 | Type : Comment |
|
| yes yes, sure, but I only dare to write about things I know ;-) |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








