• Hey, hows it going everyone? I am having database conflicts I was wanting some help with.

    Basically, I have a header that pulls in a random database field. Nothing special. It is in my header in my template and works just fine on non WordPress pages.

    $sql = "SELECT * FROM headerslogans ORDER BY RAND() LIMIT 1";
    	$result = mysql_query($sql);
    	while ($myrow = mysql_fetch_array($result)) {
      	echo $myrow['slogan'];
    };

    I am using the same database, same user name, same password, etc. However, I get this error where the echo should be….

    Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in <dir name>

    So obviously the wordpress connection is “overwriting” the other (wordpress works flawlessly). BUT, I was also confused as to why it doesn’t work, although it is connecting to the same database with same username and password.

    Can anybody help me out on this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Errors while pulling DB info from OTHER calls (not wordpress related)’ is closed to new replies.