For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > February 2005 > Re: [PHP-WIN] getting close ...but still "record doesn't exist"









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN] getting close ...but still "record doesn't exist"
Patrick Roane

2005-02-21, 3:58 pm

Thanks for information on this one. I am putting print
statements in after my sql and getting more details
about the problem. I proceeded to put spaces infront
of my "from" & "where" statements. I am still getting
a sql error, but I think it is past the prior trouble
spot. Now, I get "Resource id #3Record doesn't exist."
This is in reference to the last bit of sql code:

$fileContent = @mysql_result($result, 1, "furn_pic");

header("content-type: $fileType");

echo $fileContent;

}

else
{
echo "Record doesn't exist.";
}
?>

Is this a simple problem to fix?

--- Luis Moreira <luis.moreira@esinnovation.pt> wrote:

> You send way too much info, forcinf people to read
> through all of it, to
> understand your way of thinking and your problem.
> Keep it simple.
>
> Anyway, I think there is something wrong in here
>
> $sql = "SELECT furn_pic";
> $sql .= "FROM crost";
> $sql .= "WHERE item_num = $item_num";
> $result = mysql_query($sql)or die("Couldn't get
> file
> list");
>
> Unless I am very much mistaken, PHP does not invent
> spaces whiel concatenating strings.
> Insert one space before the words FROM and WHERE,
> otherwise you will get something like
>
>
> SELECT furn_picFROM crostWHERE item_num = ...
>
> Luis
>
>
> Patrick Roane wrote:
>
> files
>
>-----------------------------------------------------
> file
>
>---------------------------------------------------------
> code
>
>--------------------------------------------------------
>
>-------------------------------------------------------
> primary
>
>---------------------------------------------------------
>
>-------------------------------------------------------
>
>/*----------------------------------------------------start
>
>connection/selection------------------------------*/
> ";
> die("Couldn't
>
>connection/selection------------------------------------------>
> of
>
>
> file
>
>---------------------------------------------------------
>
>---------------------------------------------------------
>
>/*----------------------------------------------------start
>
>connection/selection------------------------------*/
> file
>
>$fileContent.----------------------------------------------*/
> fn:Luis Moreira (Eng)
> n:Moreira;Luis
> org;quoted-printable:Banco Espirito Santo -
> ACE;Comunica=C3=A7=C3=B5es e Seguran=C3=A7a
> adr;quoted-printable;dom:;;R. da Fraternidade
> Oper=C3=A1ria, 5;Carnaxide;;2799
> email;internet:luis.moreira@esinnovation.pt
> title:Analista
> tel;work:+351 214168288
> tel;fax:+351 214168092
> tel;cell:+351 964643928
> note:Cliente de mail : Mozilla Thunderbird
> url:http://www.moreiranet.com
> version:2.1
> end:vcard
>
>



=====
Patrick Roane
Web design and development
www.franklin-band.com
Fox River Grove, Il.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com