Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Greska "The configuration did not recieve appropriate variables to accept your request."

[es] :: PHP :: Greska "The configuration did not recieve appropriate variables to accept your request."

[ Pregleda: 1094 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

picos_f
serbia

Član broj: 103266
Poruke: 44
91.150.121.*



Profil

icon Greska "The configuration did not recieve appropriate variables to accept your request."24.01.2010. u 19:51 - pre 173 meseci
Kada pokrene ovaj kod (ovde nije dat ceo kod) dobijem gresku "The configuration did not recieve appropriate variables to accept your request." Ako neko moze da mi pomogne bio bih puno zahvalan

Code:
<?php
/*

*/
define("CALC_PERIOD",24*60*60);
class DBConnect
{
private $link=null;
private $db=null;
private $result=null;
private $primareyKeyField="userid";
private $dbtables=null;
private $dbfields=null;

function DBConnect($userid=" ----datebase user here---",$password="",$host="---- host name Here-----") ========>edit here host datebase user
{
$this->link=mysql_connect($host, $userid, $password) or die(mysql_error());
}
function setDatabase($db)
{
$this->db=$db;
mysql_select_db($this->db, $this->link) or die(mysql_error());
$tableSql="show tables from `".$this->db."`";
$res=mysql_query($tableSql, $this->link) or die(mysql_error());
while($row=mysql_fetch_row($res))
{
$this->dbtables[]=$row[0];
}
foreach($this->dbtables as $ind=>$table)
{
$defaultValueSql="show fields from `".$this->db."`.`".$table."`";
$res=mysql_query($defaultValueSql, $this->link) or die(mysql_error());
while($row=mysql_fetch_assoc($res))
{
$fldname=$row["Field"];
unset($row["Field"]);
$this->dbfields[$table][$fldname]=$row;
}
}
}
 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.31.24.217.adsl2.beograd.com.

Sajt: mysql.rs


+2377 Profil

icon Re: Greska "The configuration did not recieve appropriate variables to accept your request."24.01.2010. u 21:14 - pre 173 meseci
gde ti prijavi tu gresku? u kojoj liniji ?

ako pravis klasu - onda nemoj da koristis "or die(..." vec napravi da funkcija vrati gresku, postavi status klase etc .. a ne samo da pukne

show xyz u mysql-u nije normalan query. standardno show ovo ono neces videtiu kao rezultat posle normalnog mysql_connect (morao bi da budzis tu neke flegove). imas bazu "information_schema" u kojoj imas sve informacije koje ti trebaju a koje mozes da dobijes sa normalnim SELECT ovo ono ..
 
Odgovor na temu

picos_f
serbia

Član broj: 103266
Poruke: 44
91.150.121.*



Profil

icon Re: Greska "The configuration did not recieve appropriate variables to accept your request."24.01.2010. u 21:23 - pre 173 meseci
Znaci kada otvorim fajl preko browser-a nece da uradi nista, samo pokaze poruku "The configuration did not recieve appropriate variables to accept your request". Ovaj fajl bi koristio za cronjob. Znaci posle ovog koda sto sam postavio slede neke funkcije koje treba da se odrade, odnosno update-uju neke podatke u bazi.
 
Odgovor na temu

picos_f
serbia

Član broj: 103266
Poruke: 44
91.150.121.*



Profil

icon Re: Greska "The configuration did not recieve appropriate variables to accept your request."24.01.2010. u 21:28 - pre 173 meseci
Jel bi mogao da mi ispravis samo ovaj deo sto sam postavio, ako nije problem.
 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.31.24.217.adsl2.beograd.com.

Sajt: mysql.rs


+2377 Profil

icon Re: Greska "The configuration did not recieve appropriate variables to accept your request."25.01.2010. u 06:50 - pre 173 meseci
ovo nije bas php forum (ima i takav), a i ako oces da koristis klase onda bolje koristi mysqli connector u php-u .. al evo ti ..

Code:


<?php
define("CALC_PERIOD",24*60*60);

class DBConnect {
  private $link=null;
  private $db=null;
  private $result=null;
  private $primareyKeyField="userid";
  private $dbtables=null;
  private $dbfields=null;

  private $connected=0;
  private $error="";

  function DBConnect($userid=" ----datebase user here---",$password="",$host="---- host name Here-----"){
    $this->link=mysql_connect($host, $userid, $password);
    if (!$this->link){
       $this->error = mysql_error();
       $this->connected = 0;
    } else {
       $this->connected = 1;
    }
    return $this->connected;
  } // DBConnect
   
  function setDatabase($db){
    $this->db=$db;
    $res = mysql_select_db($this->db, $this->link);
    if (!$res){
       $this->error = mysql_error();
       $this->db = null;
       $selected = 0;
    } else {
       $selected = 1;
       $q = mysql_query("SELECT `table_name` FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`='$db'", $this->link);
       while ($row = mysql_fetch_row($q)) $this->dbtables[]=$row[0];
       @mysql_free_result($q);

       $q = mysql_query("SELECT `TABLE_NAME`, `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='$db'", $this->link);
       while ($row = mysql_fetch_assoc($q)) $this->dbfields[$row['TABLE_NAME']][]=$row['COLUMN_NAME'];
       @mysql_free_result($q);
    }
    return $selected;
  } // setDatabase

} //class
?>


 
Odgovor na temu

[es] :: PHP :: Greska "The configuration did not recieve appropriate variables to accept your request."

[ Pregleda: 1094 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.