|
|
|
|
![]() ![]() |
Jun 19 2005, 05:19 PM
Post
#1
|
|
|
Member [ Level 1 ] 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. This post has been edited by microscopic^earthling: Jun 20 2005, 03:08 AM |
|
|
|
Jun 19 2005, 05:43 PM
Post
#2
|
|
|
Techno-Necromancer 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 |
|
|
|
Jun 19 2005, 06:02 PM
Post
#3
|
|
|
Member [ Level 1 ] 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.
|
|
|
|
Jun 19 2005, 06:05 PM
Post
#4
|
|
|
Techno-Necromancer 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 |
|
|
|
Jun 19 2005, 07:45 PM
Post
#5
|
|
|
Super Member 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. |
|
|
|
Jun 20 2005, 03:01 AM
Post
#6
|
|
|
PsYcheDeLiC dR3aMeR 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. |
|
|
|
Aug 15 2005, 02:40 PM
Post
#7
|
|
|
Newbie [ Level 2 ] 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. |
|
|
|
Aug 16 2005, 09:42 AM
Post
#8
|
|
|
Newbie [ Level 1 ] 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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 4th December 2008 - 11:23 PM |