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

Word Trimming
Hi Guys & Gals!!

Hope you are all ok....

I need some help with the following

str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa

Display the user's weight lost in the past week
Hello everyone,

I am working on a weight loss app for my site, and I want to display the user

image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image

Embed Video Problem
Hey, thanks for looking!

File to be embedded:

Code: <playlist version="1&q

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:<

breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:

abc

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

disable all input buttons
Hello Friends,

suppose i do have a file ( file.php ) has a submit button

Code: [Sele

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