Indian Posted April 16, 2009 Report 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
Aleksejs Posted April 16, 2009 Report 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
Delfins Posted April 16, 2009 Report 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
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.