Jump to content

BK87

Members
  • Posts

    147
  • Joined

  • Last visited

Posts posted by BK87

  1. you don\'t have to edit the php source for this... just do

    [php:1:1eb605ea67]<?php

    function query_db($query){

    $mysql_query=mysql_query($query);

    return $mysql_query;

    }

    $sample_query=query_db(\"select * from table order by column asc\");

    ?>[/php:1:1eb605ea67]

     

    just some simple shit....

  2. try replacing

     

    [php:1:55ca29e7a5]

    $id = $_POST[\'id\'];

    [/php:1:55ca29e7a5]

    with

    [php:1:55ca29e7a5]

    $id = $_POST[\"id\"];

    [/php:1:55ca29e7a5]

     

    and

     

    [php:1:55ca29e7a5]<?php

    $query = \"DELETE FROM notices WHERE \'id\' = \'$id\' \";

    ?>[/php:1:55ca29e7a5]

    with

    [php:1:55ca29e7a5]<?php

    $query = \"DELETE FROM notices WHERE id = \'$id\' \";

    ?>[/php:1:55ca29e7a5]

  3. try

    [php:1:ad8da68d88]

    $sql = mysql_query(\"INSERT INTO users SET id=\'$this->id\', name=\'$this->name\', title=\'$this->title\', points=\'$this->points\', respect=\'$this->respect\', postcount=\'$this->postcount\', artcount=\'$this->artcount\', mood=\'$this->mood\', status=\'$this->status\', pageviews=\'$this->pageviews\', group=\'$this->group\', fullname=\'$this->fullname\', location=\'$this->location\', email=\'$this->email\', signature=\'$this->signature\', textoptions=\'$this->textoptions\', logintime=\'$this->logintime\', clist=\'$this->clist\', ignorelist=\'$this->ignorelist\', about=\'$this->about\', avatar=\'$this->avatar\', interests=\'$this->interests\', aim=\'$this->aim\', msn=\'$this->msn\', yahoo=\'$this->yahoo\', jmonth=\'$this->jmonth\', jday=\'$this->jday\', jyear=\'$this->jyear\', bmonth=\'$this->bmonth\', bday=\'$this->bday\', byear=\'$this->byear\', hostaddress=\'$this->hostaddress\', password=\'$this->password\'\") or die(\"Invalid query: \" . mysql_error());

    [/php:1:ad8da68d88]

     

    Make sure the fields exist in the table.

  4. Hey,

     

    I got a prolem with my server... Why are people getting a DNS error when they go to some pages on my site, and others work?

     

    Running Apache2 on Windows XP pro

     

    Thanks

  5. How come sometimes when I start up mysql it works, and then other times it don\'t? I get some errors,(2003) and then when I go to services, to check for mysql if its started I see it isn\'t then I start it, and it jumps back to stopped state again.

     

    This\' the exact error that happens....

    
    C:Documents and Settingsusr>net start mysql
    
    The MySql service is starting.
    
    The MySql service could not be started.
    
    
    
    A system error has occurred.
    
    
    
    System error 1067 has occurred.
    
    
    
    The process terminated unexpectedly.
    
    

     

    Some one help me.. thanks

  6. try this it works on my box.. as a matter a fact I\'m using it

    [php:1:eca989abab]<?php

    //Settings

    $server=\"localhost\";

    $database=\"db\";

    $username=\"user\";

    $pass=\"pass\";

    $table=\"table\";

     

    //Code

    $db = mysql_connect($server,$username,$pass\");

    mysql_select_db($database);

    $list = mysql_query(\"SELECT * FROM $table\") or die (mysql_error());

    while ($row = mysql_fetch_array($list)) {

    print(\"$row[usernme]\");

    }

     

    ?>[/php:1:eca989abab]

     

    Again chage username to what ever field you have.. this works on my box, if it don\'t on yours, then I suggest you get another one.

  7. Try this:

    [php:1:6823e43252]<?php

    //Databaseinfo

    $database=\"db\";

    $db = mysql_connect(\"localhost\",\"user\",\"pass\");

    mysql_select_db($database);

    //Code

    $listm = mysql_query(\"SELECT * FROM contest_users\") or die (mysql_error());

    while ($row = mysql_fetch_array($listm)) {

    print(\"$row->username\");

    }

    ?>[/php:1:6823e43252]

     

    Use $row to select the row that you want, like username, or pass...

     

    Hope it helps

  8. Why does my, mysql service shut down when I start it? I use the proper command lines.. and this worked before.. then I restarted the pc, and boom it dosen\'t work...

    Some one help me..

     

    Thanks

×
×
  • 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.