Jump to content
php.lv forumi

Recommended Posts

Posted

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?

Posted

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;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...