Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result


Posted on 16th Feb 2014 07:03 pm by admin

what is wrong with this

Code: [Select]<?php
if ($_SERVER['HTTP_REFERER'])
{
if($_GET['id'])
{
$con = mysql_connect("","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("rubberduckiee", $con);

$result = mysql_query("SELECT * FROM email_content where id=".$_GET['id']);

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

if($_GET['part'] == "body")
{
echo $row['email_content_body'];
}
elseif($_GET['part'] == "footer")
{
echo $row['email_content_footer'];
}
elseif ($_GET['part'] == "header")
{
echo $row['email_content_header'];
}

}
}
}

?>i am getting the error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/rubberduckiee/webapps/editor/email_editor.php on line 17

No comments posted yet

Your Answer:

Login to answer
92 Like 39 Dislike
Previous forums Next forums
Other forums

Unable to customise toolbar in FCK
CE 7.1 and External GIS integration
Hi All,

We want to develop an application on CE 7.1 which uses GIS features from an exter

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

Weird problem with SELECT command..Help!
Hi!

It seems I'm having a really weird problem with SQL SELECT command....I have table into a

How to change www in url with a specified name
Hi
I'm trying to change the url http://www.sitename.com/apparels to something like below
http:

Opening Multiple Files/Links in Order.
I want to open links in order/one-by-one and check each for a specific string.

Example:
I

Hits this week counter
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the

User input in to variable
Hi all,

I'm sure this is very easy but I'm having another brain freeze!

At the end of

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

Fatal error: Call to a member function fetchrow() on a non-object in C:xamppht
okay i have this query and everytime i add `item_id`=? to it... it gives me the error in the title..

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash