Indian Posted April 16, 2009 Report Share Posted April 16, 2009 somefile.php <? function load($s) { include($s); } load('getdatafromdb.php'); ?> getdatafromdb.php <? mysql_query("SELECT ... bla bla bla "); ?> Vārdu sakot, es nevaru iegūt informāciju no datubāzes. Jautājums, kā šo izlabot? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 16, 2009 Report Share Posted April 16, 2009 Kā izpaužas nevarēšana dabūt no datu bāzes. Kādus kļūdu paziņojumus rāda? mysql_query("SELECT ... bla bla bla ") or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
Delfins Posted April 16, 2009 Report Share Posted April 16, 2009 diezgan līks veids kā iegūt datus. a.php -> function x($a) { mysql(... select .. where a = $a) or die(..); ... return $result; } include "a.php"; $a = x("bebe"); echo $a; Quote Link to comment Share on other sites More sharing options...
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.