Re: [PHP] Syntax Eyes

2001-07-25 Thread Morten Winkler Jørgensen

CD Hey, I need a set of extra eyes:

OK. I'll put on my magic X-ray typ-oh-glasses ;)

CD $res_id = mysql_query (update contacts_data set (
CD description='$description',
CD data='$data',
CD filename='$input_file_name',
CD filesize='$input_file_size',
CD filetype='$input_file_type'
CD where uid='$uid'
CD ));

My glasses suggests that it might be this:
   You are writing
   UPDATE adf SET (asdf = 'asd', sadf='ert', ..., WHERE uid =
   'myuid')

   but try moving the WHERE clause outside the parentheses like

   UPDATE adf SET (asdf = 'asd', sadf='ert') WHERE uid =
   'myuid'

Of cause my glasses might be broken or need a recompile...
   
Kind regards,
Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-25 Thread Mark Roedel

 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 10:53 PM
 To: Matthew Loff; 'Php-General'
 Subject: Re: [PHP] Syntax Eyes
 
 
 Okay, I figured out the @header will actually reset the 
 headers, but it still just prints the raw data to the
 screen instead of the actual image.  How can I fix this?

Errr...actually, no it won't.

@header(), as opposed to header(), simply says If you run into any
errors, don't bother telling me about them.  The fact that, as you say,
the raw data gets printed instead of an image, should tell you that the
header isn't having any effect.

The general rule is that you can't send headers once you've started
sending output to the browser.  In this case, I'm wondering why you want
image data and html tags in the same file anyway...is that really what
you intended?  (Remember, a web browser is basically going to be
expecting a single file in response to a single request...)


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


 
 echo /TDTD NOWRAP ALIGN=\LEFT\ BGCOLOR=\#C8CCC8\;
   if($db-f(bin_data))
   {
 /*
 This doesn't help...
 @header (Content-disposition: filename=.$filename);
 @header( Content-type: image/jpeg );
 */
  $db-p(bin_data);
 
 
   } else {
  echo No Picture Available;
 
 
 -Clayton
 
 
 
 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Clayton Dukes' [EMAIL PROTECTED]; 'Php-General'
 [EMAIL PROTECTED]
 Sent: Tuesday, July 24, 2001 11:20 PM
 Subject: RE: [PHP] Syntax Eyes
 
 
 
  Output control functions will let you buffer the output, and you can
  decide to send a header instead of flushing the buffer to 
 the client:
 
  http://www.php.net/manual/en/ref.outcontrol.php
 
  ob_start()  flush()  should accomplish this all for you.
 
 
  -Original Message-
  From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 11:14 PM
  To: Php-General
  Subject: Re: [PHP] Syntax Eyes
 
 
  Nevermind, I got it...
 
  Now, how do you reset header information if you need to redclare the
  header(); 
 
  ie:
  Warning: Cannot add header information - headers already 
 sent by (output
  started at ...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Syntax Eyes

2001-07-25 Thread Clayton Dukes

I have a row in sql that is binary data (a jpeg)
I need to echo that data to a table on the web page in the form of the
original jepg, when I echo it now, I just get the actual data stream.

How can I fix this?



- Original Message -
From: Mark Roedel [EMAIL PROTECTED]
To: Clayton Dukes [EMAIL PROTECTED]; Php-General
[EMAIL PROTECTED]
Sent: Wednesday, July 25, 2001 9:58 AM
Subject: RE: [PHP] Syntax Eyes


  -Original Message-
  From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 10:53 PM
  To: Matthew Loff; 'Php-General'
  Subject: Re: [PHP] Syntax Eyes
 
 
  Okay, I figured out the @header will actually reset the
  headers, but it still just prints the raw data to the
  screen instead of the actual image.  How can I fix this?

 Errr...actually, no it won't.

 @header(), as opposed to header(), simply says If you run into any
 errors, don't bother telling me about them.  The fact that, as you say,
 the raw data gets printed instead of an image, should tell you that the
 header isn't having any effect.

 The general rule is that you can't send headers once you've started
 sending output to the browser.  In this case, I'm wondering why you want
 image data and html tags in the same file anyway...is that really what
 you intended?  (Remember, a web browser is basically going to be
 expecting a single file in response to a single request...)


 ---
 Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
 Systems Programmer / WebMaster  ||   My schedule is already full.
  LeTourneau University  ||-- Henry Kissinger



  echo /TDTD NOWRAP ALIGN=\LEFT\ BGCOLOR=\#C8CCC8\;
if($db-f(bin_data))
{
  /*
  This doesn't help...
  @header (Content-disposition: filename=.$filename);
  @header( Content-type: image/jpeg );
  */
   $db-p(bin_data);
 
 
} else {
   echo No Picture Available;
 
 
  -Clayton
 
 
 
  - Original Message -
  From: Matthew Loff [EMAIL PROTECTED]
  To: 'Clayton Dukes' [EMAIL PROTECTED]; 'Php-General'
  [EMAIL PROTECTED]
  Sent: Tuesday, July 24, 2001 11:20 PM
  Subject: RE: [PHP] Syntax Eyes
 
 
  
   Output control functions will let you buffer the output, and you can
   decide to send a header instead of flushing the buffer to
  the client:
  
   http://www.php.net/manual/en/ref.outcontrol.php
  
   ob_start()  flush()  should accomplish this all for you.
  
  
   -Original Message-
   From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 24, 2001 11:14 PM
   To: Php-General
   Subject: Re: [PHP] Syntax Eyes
  
  
   Nevermind, I got it...
  
   Now, how do you reset header information if you need to redclare the
   header(); 
  
   ie:
   Warning: Cannot add header information - headers already
  sent by (output
   started at ...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-25 Thread Mark Roedel

 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 25, 2001 10:42 AM
 To: Mark Roedel; Php-General
 Subject: Re: [PHP] Syntax Eyes
 
 
 I have a row in sql that is binary data (a jpeg)
 I need to echo that data to a table on the web page in the form of the
 original jepg, when I echo it now, I just get the actual data stream.

 How can I fix this?

?php
   echo tdimg src=\/path/to/script/that/outputs.jpeg\/td;
?


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-25 Thread Lawrence . Sheed

Almost, but not quite.  You also need to prepend a Header before any output
your data to tell the browser its content type.

Eg

?php

Header(Content-type: image/jpg);

...rest of output code

?


-Original Message-
From: Mark Roedel [mailto:[EMAIL PROTECTED]]
Sent: July 26, 2001 12:02 AM
To: Clayton Dukes; Php-General
Subject: RE: [PHP] Syntax Eyes


 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 25, 2001 10:42 AM
 To: Mark Roedel; Php-General
 Subject: Re: [PHP] Syntax Eyes
 
 
 I have a row in sql that is binary data (a jpeg)
 I need to echo that data to a table on the web page in the form of the
 original jepg, when I echo it now, I just get the actual data stream.

 How can I fix this?

?php
   echo tdimg src=\/path/to/script/that/outputs.jpeg\/td;
?


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Syntax Eyes

2001-07-24 Thread Clayton Dukes

Nevermind, I got it...

Now, how do you reset header information if you need to redclare the
header(); 

ie:
Warning: Cannot add header information - headers already sent by (output
started at ...


-Clayton


- Original Message -
From: Clayton Dukes [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 10:54 PM
Subject: [PHP] Syntax Eyes


Hey, I need a set of extra eyes:

$res_id = mysql_query (update contacts_data set (
description='$description',
data='$data',
filename='$input_file_name',
filesize='$input_file_size',
filetype='$input_file_type'
where uid='$uid'
));

Can someone tell me why this is yeilding:

MySQL Error: (1064) You have an error in your SQL syntax near '( 'Clayton
Dukes', 'ÿØÿà\0JFIF\0\0H\0H\0\0ÿÛ\0C\0' at line 1


???
TIA!
--
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-24 Thread Matthew Loff


Output control functions will let you buffer the output, and you can
decide to send a header instead of flushing the buffer to the client:

http://www.php.net/manual/en/ref.outcontrol.php

ob_start()  flush()  should accomplish this all for you.


-Original Message-
From: Clayton Dukes [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 24, 2001 11:14 PM
To: Php-General
Subject: Re: [PHP] Syntax Eyes


Nevermind, I got it...

Now, how do you reset header information if you need to redclare the
header(); 

ie:
Warning: Cannot add header information - headers already sent by (output
started at ...


-Clayton


- Original Message -
From: Clayton Dukes [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 10:54 PM
Subject: [PHP] Syntax Eyes


Hey, I need a set of extra eyes:

$res_id = mysql_query (update contacts_data set (
description='$description',
data='$data',
filename='$input_file_name',
filesize='$input_file_size',
filetype='$input_file_type'
where uid='$uid'
));

Can someone tell me why this is yeilding:

MySQL Error: (1064) You have an error in your SQL syntax near '(
'Clayton Dukes', 'ÿØÿà\0JFIF\0\0H\0H\0\0ÿÛ\0C\0' at line 1


???
TIA!
--
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from
http://www.gdd.net





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Syntax Eyes

2001-07-24 Thread Clayton Dukes

Okay, I figured out the @header will actually reset the headers, but it
still just prints the raw data to the screen instead of the actual image.
How can I fix this?

echo /TDTD NOWRAP ALIGN=\LEFT\ BGCOLOR=\#C8CCC8\;
  if($db-f(bin_data))
  {
/*
This doesn't help...
@header (Content-disposition: filename=.$filename);
@header( Content-type: image/jpeg );
*/
 $db-p(bin_data);


  } else {
 echo No Picture Available;


-Clayton



- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Clayton Dukes' [EMAIL PROTECTED]; 'Php-General'
[EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 11:20 PM
Subject: RE: [PHP] Syntax Eyes



 Output control functions will let you buffer the output, and you can
 decide to send a header instead of flushing the buffer to the client:

 http://www.php.net/manual/en/ref.outcontrol.php

 ob_start()  flush()  should accomplish this all for you.


 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 11:14 PM
 To: Php-General
 Subject: Re: [PHP] Syntax Eyes


 Nevermind, I got it...

 Now, how do you reset header information if you need to redclare the
 header(); 

 ie:
 Warning: Cannot add header information - headers already sent by (output
 started at ...


 -Clayton


 - Original Message -
 From: Clayton Dukes [EMAIL PROTECTED]
 To: Php-General [EMAIL PROTECTED]
 Sent: Tuesday, July 24, 2001 10:54 PM
 Subject: [PHP] Syntax Eyes


 Hey, I need a set of extra eyes:

 $res_id = mysql_query (update contacts_data set (
 description='$description',
 data='$data',
 filename='$input_file_name',
 filesize='$input_file_size',
 filetype='$input_file_type'
 where uid='$uid'
 ));

 Can someone tell me why this is yeilding:

 MySQL Error: (1064) You have an error in your SQL syntax near '(
 'Clayton Dukes', 'ÿØÿà\0JFIF\0\0H\0H\0\0ÿÛ\0C\0' at line 1


 ???
 TIA!
 --
 Clayton Dukes
 CCNA, CCDA, CCDP, CCNP
 (c) 904.477.7825
 (h) 904.292.1881
 Download Free Essays, Term Papers and Cisco Training from
 http://www.gdd.net





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To
 contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]