Jump to content

Cereal

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by Cereal

  1. well when i look to privilages on a specifik database is see this: User Host Type Privileges Grant Action root localhost global ALL PRIVILEGES Yes Edit Any % database-specific SELECT, INSERT, UPDATE, DELETE, CREATE, REFERENCES, INDEX, ALTER No Edit emt localhost database-specific ALL PRIVILEGES No Edit now i waant to delete the any acount on this db, how can i do this, when i click the edit link (phpmyadmin) i get this eror. User \'\'@\'%\' - Database test The selected user was not found in the privilege table. how can i do this? Thanks.
  2. use2 sql querie. the first one gets the max number off rows in the table, and saves this number into an var. then use the randomze function from php to generate an random number. now run an second sql querie that also limits the 6 collums (or whatever), and specify in the query the number you let php generate. and you have an random record out off ythe table. this is an example coe that i use. $q = "SELECT COUNT(*) AS c FROM news WHERE typ = \'news\' AND approved = 1 AND theme <> \'$sms_subj\'"; $result = mysql_db_query($edge_database,$q,$mysql); $row = mysql_fetch_object($result); $rnd = rand(1,$row->c); $q = "SELECT * FROM news WHERE id = $rnd"; $result = mysql_db_query($edge_database,$q,$mysql); $row = mysql_fetch_object($result); echo "<p class=edgenormal>"; edge_do_title("Random old article"); ?> <center><a href=newsread.php?newsid=<? echo $row->id; ?>><? echo $row->title; ?></a></center> </p> i hope this helps:)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.