Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> MySQL: Help Needed With MySQL_fetch_array() Error, help needed
Cookiemonster
post Jun 19 2005, 05:19 PM
Post #1


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 36
Joined: 10-June 05
From: London
Member No.: 6,063



I have my site up and running, it it written in php but the problem im getting is the mysql database the warning is:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mrogers/public_html/config.php on line 47

but on line 47 it shows this:

$email = mysql_fetch_array($adminemail);

any one help on this + my site wont connect to my database. I have feeled out all the requirements that has asked and i know its write.

All help would be apreciated as i would like my site fully functional by next week. smile.gif

This post has been edited by microscopic^earthling: Jun 20 2005, 03:08 AM
Go to the top of the page
 
+Quote Post
vizskywalker
post Jun 19 2005, 05:43 PM
Post #2


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



Without a greater block of code to know what $adminemail represents we can't help you. And the error message that MySql gives you would help us assess the problem.

~Viz
Go to the top of the page
 
+Quote Post
Cookiemonster
post Jun 19 2005, 06:02 PM
Post #3


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 36
Joined: 10-June 05
From: London
Member No.: 6,063



I could give you the config file if you want or my web address so you may see what the problem is as i would really like to get this problem fixed.
Go to the top of the page
 
+Quote Post
vizskywalker
post Jun 19 2005, 06:05 PM
Post #4


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



Both the php script you wrote (with username and password x'ed out for security and the web address would be helpful.

~Viz
Go to the top of the page
 
+Quote Post
Houdini
post Jun 19 2005, 07:45 PM
Post #5


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



what it looks like is the config file for a PHP-Nuke but nevertheless look at the below code: I host a Nuke on Astahost so you should be similar.
[CODE]$dbhost = "localhost";
$dbuname = "XXXXXX";
$dbpass = "XXXXXX";
$dbname = "yourUsername";
$prefix = "nuke";
$user_prefix = "nuke";
$dbtype = "MySQL";
$sitekey = "S·kQSd5%W@Y62-dm29-.-39.3a8sUf+W9";
$gfx_chk = 0;
$subscription_url = "";
$admin_file = "admin";
$advanced_editor = 0;
$display_errors = 0;[QUOTE] If you go to your site lets say http://mynewsite.astahost.com/ and it shows Sorry there seems to be a problem with the MySQL server you have not set up your database. If you are using PHP-Nuke then this is the case I run a standard PHP-Nuke and also an IPB-Nuke site (it has IPB forums instead of phpBB) and I write ported MODs for PHP-Nuke and I also modify the IPB boards mostly cause I don't like the crappy button in the posting area.

If you want further help send me a PM or email and I'll correct you code in a few minutes.
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post Jun 20 2005, 03:01 AM
Post #6


PsYcheDeLiC dR3aMeR
Group Icon

Group: Admin
Posts: 2,242
Joined: 29-January 05
From: Nakorn Chaisri, Thailand
Member No.: 2,411
myCENTs:84.36



QUOTE(Cookiemonster @ Jun 20 2005, 12:19 AM)


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mrogers/public_html/config.php on line 47

but on line 47 it shows this:

$email = mysql_fetch_array($adminemail);

any one help on this + my site wont connect to my database. I have feeled out all the requirements that has asked and i know its write.
*



See this is your second post with almost exact same problem - we've told you before, unless you can post a good part of the code it won't be possible to crack the problem in any way. This way at best, we can make some wild guesses - such error messages can be caused by over a million different reasons. You'll never get a good reply unless you're more specific with your problem.
Go to the top of the page
 
+Quote Post
fabiocardoso
post Aug 15 2005, 02:40 PM
Post #7


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 25
Joined: 7-August 05
Member No.: 7,682



In this case $adminemail has that to be the result of a valid query. Something as:
$adminemail = mysql_query("SELECT email FROM table";

I wait to have helped.
Go to the top of the page
 
+Quote Post
ajmal
post Aug 16 2005, 09:42 AM
Post #8


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 7
Joined: 16-August 05
Member No.: 7,892



@fabio: are you Brazilian? Your name and the way you write just looks Brazilian =)

@Houdini: the piece of code you post won't help; you must use mysql_connect() to actually connect to the database.

@Cookiemonster: Your problem is exactly what it says; "argument is not a valid MySQL result resource ". Do what fabio told; or something like:

$adminemail = mysql_query("SOMEQUERYHERE") or die (mysql_error());

which will return an error if any
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. MySQL - Trouble With Bulk Insert Statements(3)
  2. MySQL Realtime Replication(4)
  3. Recover Tables From A MySQL .frm File(8)
  4. Mirror My MySQL Database To Another Mysql Server(4)
  5. How To Connect MySQL With Flash?(8)
  6. MySQL Output Database Question(18)
  7. MySQL, Multiple Tables(24)
  8. Navcat For MySQL(9)
  9. Permission Problem With Mysql Database Creation(8)
  10. Mysql And Php(15)
  11. Login System Using A Mysql Db(5)
  12. Oracle Vs. Mysql Vs. Postgresql(9)
  13. Subqueries In Mysql(1)
  14. Apache Php With Mysql On Windows [solved](9)
  15. Mysql - So Hard(14)
  1. Mysql Problem(1)
  2. Sun Bought Mysql(6)
  3. Mysql Backup With Another Address?(4)
  4. I Have An Error With My Mysql Connection(7)
  5. Mysql And User File_priv(0)
  6. Mysql Database Management(1)
  7. Mysql Database Entry By Excel Sheets(2)
  8. Mysql On Computer(9)
  9. Space Needed For Database(10)
  10. Any Website Provide Free Host Mysql Host?(4)
  11. Mysql Multiple Tables(1)
  12. Mysql Overhead(3)
  13. Login System(6)


 



- Lo-Fi Version Time is now: 4th December 2008 - 11:23 PM