Persia wrote:
> 
> 
> --- In [email protected] <mailto:php-list%40yahoogroups.com>, 
> William Piper <[EMAIL PROTECTED]> wrote:
>  >
>  > Persia wrote:
>  > >
>  > >
>  > > Hello ,in this code i'm going to add a name to my root address from
>  > > database which will be the name of the name of a new folder at the end
>  > > of root address , but i cann't add the result of query there !!
>  > >
>  > > $sql = "SELECT pr_name FROM $tbl_name WHERE id='$project_id'";
>  > > $sql2 = @MYSQL_QUERY($sql);
>  > >
>  > > $target = $_SERVER['DOCUMENT_ROOT']."/upload/.$sql2";
>  >
>  > $sql2 is the query handle. You need to do the following:
>  >
>  > $sql = "SELECT pr_name FROM $tbl_name WHERE id='$project_id'";
>  > $sql2 = @MYSQL_QUERY($sql);
>  > $prname = mysql_result($sql2,0);
>  > $target = $_SERVER['DOCUMENT_ROOT']."/upload/.$prname";
>  >
>  > Good Luck,
>  >
>  > William Piper
>  >**********************
> Hello william , thanks for attention , but i have got these problems
> with new code !!!
> 
> Warning: mysql_result() [function.mysql-result]: Unable to jump to row
> 0 on MySQL result index 3 in
> /home/virtual/h-daneshvar.com/public_html/upload/dyplay.php on line 28
> 
> Warning: opendir() [function.opendir]: SAFE MODE Restriction in
> effect. The script whose uid is 502 is not allowed to access / owned
> by uid 0 in
> /home/virtual/h-daneshvar.com/public_html/upload/dyplay.php on line 59
> 
> Warning: opendir(/ upload/) [function.opendir]: failed to open dir: No
> such file or directory in
> /home/virtual/h-daneshvar.com/public_html/upload/dyplay.php on line 59
> 
> Warning: readdir(): supplied argument is not a valid Directory
> resource in
> /home/virtual/h-daneshvar.com/public_html/upload/dyplay.php on line 60
> 

The error, "unable to jump to row 0" sounds like you didn't receive any 
results from your query. I suggest doing an echo of $sql and copying and 
pasting that into a mysql command line and see if you are getting any 
results. Chances are that you aren't.

Regarding the "Safe Mode restriction", I have never seen that. It sounds 
like a server side issue. Did you do a setuid on the directories?

The other opendir and readdir is probably a result of the "safe mode 
restiction".

William P.

Reply via email to