Sliipeetais Posted October 28, 2004 Report Share Posted October 28, 2004 $con=mysql_connect(localhost, username, "parole"); mysql_select_db(dbname, $con); $id=mysql_query("SELECT id FROM tablename ORDER BY id"); $result_id=mysql_fetch_array($id); <----- mysql_fetch_array(): supplied argument is not a valid MySQL result resource $result_id=$result_id++; Pagājusi vismaz stunda domājot, bet es vēl aizvien nesaprotu. Link to comment Share on other sites More sharing options...
Aleksejs Posted October 28, 2004 Report Share Posted October 28, 2004 Ja nav nodefinēta konstante username, tad pieņemu, ka username jābūt pēdiņās. Tas pats ar dbname. Pārbaudi, vai tiešām eksistē tabula ar nosaukumu tablename un vai šajā tabulā ir lauks id. Link to comment Share on other sites More sharing options...
Sliipeetais Posted October 28, 2004 Author Report Share Posted October 28, 2004 Tiešām, ļoti muļķīga kļūda - biju norādījis nepareizo db. Ahh.. Link to comment Share on other sites More sharing options...
bubu Posted October 28, 2004 Report Share Posted October 28, 2004 Kad cilvēki beidzot iemācīsies izsaukt mysql_error()... :( Link to comment Share on other sites More sharing options...
Sliipeetais Posted October 28, 2004 Author Report Share Posted October 28, 2004 Tagad skaidrs - http://lv.php.net/mysql_error. Link to comment Share on other sites More sharing options...
Recommended Posts