Output buffering will do it.
Also I am not sure but did you try retrieving content with fopen() ?
Something like
$file = 'invoicetable_bottom.php';
fopen("http://yoursite.com/folder/$file","r";);
http://tr.php.net/function.fopen
worth trying. Easier than output buffering
-Original Message
Hi,
The simplest way (actually the single way I know :) ) would be to
capture the output using output buffering functions, something like this:
// start output buffering
ob_start();
// include the file that generates the HTML (or whatever content)
include "";
// get output buffer content
$
Morning!
Just a quick question.
Say I have a column in my database that could contain NULLS, empty spaces,
or an actual value.
If I do:
$my_query = "SELECT my_column FROM my_database WHERE 1 = 1";
$my_result = ifx_query($my_query, $connect_id);
while($row = ifx_fetch_row($my_result)) {
$my_c
Use var_dump before processing your result.
Regards,
Samrat Kar
FRD, BARC
Tel: 022-25597295
Alternate Email: esam...@yahoo.com
-Original Message-
From: Dan Shirah [mailto:mrsqua...@gmail.com]
Sent: Wednesday, September 23, 2009 5:28 PM
To: PHP General
Subject: [PHP] NULLS vs Empty res
using empty() is ´the right way to check a var for NULL or ""
however, it also depends what MySQL has got as setuo definition for empty
fields. on textfields u can define an epmty string as default.
ralph_def...@yahoo.de
"Dan Shirah" wrote in message
news:a16da1ff0909230458o30d66186m75fc4fd0d19
>
> using empty() is ´the right way to check a var for NULL or ""
>
> however, it also depends what MySQL has got as setuo definition for empty
> fields. on textfields u can define an epmty string as default.
>
> So say these are the first three results of my query:
"some text" //The column actual
Ralph Deffke wrote:
using empty() is ´the right way to check a var for NULL or ""
Empty will also match a string containing 0. And, to me, that doesn't at
all seem empty :)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (htt
if it can take only numeric values u can use is_numeric()
also i suggest that you not to use nulls in dbs. instead, use "not null" and
"default value" property. Its more simple and more effective for both managing
your database and coding your program.
-Original Message-
From: Robert C
On Wed, 2009-09-23 at 16:34 +0300, Mert Oztekin wrote:
> if it can take only numeric values u can use is_numeric()
>
> also i suggest that you not to use nulls in dbs. instead, use "not null" and
> "default value" property. Its more simple and more effective for both
> managing your database and
This might help some people struggling with memory leak problems in
DOMPDF. I haven't fixed it but it seems to have reduced the memory leak
considerably.
I have done 2 things:
1.
Added a detruct function to the DOMPDF file in dompdf.cls.php where I
unset everything. I call this each time in my l
Good morning Everyone,
I'm have trouble with a simple HTML Checkbox list. I keep getting *Parse
error*: syntax error, unexpected '>'. I'm sure I'm doing something really
simple and basic wrong I just cannot seem to see what it is, any assistance
is appreciated.
Script:
http://bw.org/misc/cgi-tes
You missed a double quote here:
echo "
\n";
De: Haig Davis
Para: php-general@lists.php.net
Enviado: miércoles, 23 de septiembre, 2009 16:18:17
Asunto: [PHP] Parse error: syntax error, unexpected '>'
Good morning Everyone,
I'm have trouble wi
On Wed, 2009-09-23 at 07:18 -0700, Haig Davis wrote:
> echo " ".$row['melID']." name="\".$row['melID].\""/input> ";
You're escaping in the wrong places. The \ escapes the character
following it, so what you are doing here, in line 2, is breaking out of
the string with a regular " and then printing
Reading again, it's not just one miss. You have to close some strings, escape
some quotes, etc
I think this can be right:
$sql = "SELECT * FROM melstatus WHERE custID=$custID ORDER BY
aircraftRegistration";
$q = mysql_query($q)
or die ("could not execute query.");
echo "
Mert Oztekin wrote:
> Output buffering will do it.
>
> Also I am not sure but did you try retrieving content with fopen() ?
>
> Something like
>
> $file = 'invoicetable_bottom.php';
> fopen("http://yoursite.com/folder/$file","r";);
>
> http://tr.php.net/function.fopen
>
> worth trying. Easier
Dan Shirah wrote:
> Morning!
>
> Just a quick question.
>
> Say I have a column in my database that could contain NULLS, empty spaces,
> or an actual value.
>
> If I do:
>
> $my_query = "SELECT my_column FROM my_database WHERE 1 = 1";
> $my_result = ifx_query($my_query, $connect_id);
>
> while
>
> From reading the other responses to this thread, it seems that you want
> to
> "skip" or "exclude" rows in the results where my_column === null.
>
> If this is correct, why not do it in the SELECT statement to begin with?
>
> $my_query = "SELECT my_column FROM my_database WHERE my_column IS NO
On Wed, 2009-09-23 at 07:36 -0700, Jim Lucas wrote:
> Mert Oztekin wrote:
> > Output buffering will do it.
> >
> > Also I am not sure but did you try retrieving content with fopen() ?
> >
> > Something like
> >
> > $file = 'invoicetable_bottom.php';
> > fopen("http://yoursite.com/folder/$file","
>
> if it can take only numeric values u can use is_numeric()
>
> also i suggest that you not to use nulls in dbs. instead, use "not null"
> and "default value" property. Its more simple and more effective for both
> managing your database and coding your program.
>
>
It's a CHAR (60) field.
This
On Sep 21, 2009, at 6:20 PM, Jim Lucas wrote:
Jim Lucas wrote:
Jônatas Zechim wrote:
Hi there, i've the following strings:
$string1 = 'Lorem ipsum dolor http://site.com sit amet';
$string2 = 'Lorem ipsum dolor http://www.site.com/ sit amet';
$string3 = 'Lorem ipsum dolor http://www.site.net s
On Sep 23, 2009, at 9:48 AM, Dan Shirah wrote:
From reading the other responses to this thread, it seems that you
want
to
"skip" or "exclude" rows in the results where my_column === null.
If this is correct, why not do it in the SELECT statement to begin
with?
$my_query = "SELECT my_col
On Wed, Sep 23, 2009 at 11:35 AM, Philip Thompson
wrote:
> On Sep 23, 2009, at 9:48 AM, Dan Shirah wrote:
>
>>>
>>> From reading the other responses to this thread, it seems that you want
>>> to
>>> "skip" or "exclude" rows in the results where my_column === null.
>>>
>>> If this is correct, why n
> $file = 'invoicetable_bottom.php';
> fopen("http://yoursite.com/folder/$file","r";);
>
> http://tr.php.net/function.fopen
>
> worth trying. Easier than output buffering
Easier in what sense? It would end up requiring more code than
output-buffering because you'd have to read from the file after
Philip Thompson wrote:
> On Sep 21, 2009, at 6:20 PM, Jim Lucas wrote:
>
>> Jim Lucas wrote:
>>> Jônatas Zechim wrote:
Hi there, i've the following strings:
$string1 = 'Lorem ipsum dolor http://site.com sit amet';
$string2 = 'Lorem ipsum dolor http://www.site.com/ sit amet';
>>
Ashley Sheridan wrote:
> On Wed, 2009-09-23 at 07:36 -0700, Jim Lucas wrote:
>> Mert Oztekin wrote:
>>> Output buffering will do it.
>>>
>>> Also I am not sure but did you try retrieving content with fopen() ?
>>>
>>> Something like
>>>
>>> $file = 'invoicetable_bottom.php';
>>> fopen("http://yours
Hello,
I just spent way, way to much time trying to debug code due to a misnamed
element. Here is a simplified example of the problem I dealt with.
$test = "SELECT * FROM `Materials` WHERE `Part_Number` = '125664'";
$result = mysql_query($test,$handle);
if(!$result)
Hi,
There is, see here (or it can also be set through php.ini):
http://www.php.net/manual/en/function.error-reporting.php
You are looking for E_STRICT.
Regards,
Jonathan
On Wed, Sep 23, 2009 at 3:11 PM, Tim Legg wrote:
> Hello,
>
> I just spent way, way to much time trying to debug code due
- Original Message
> From: Tim Legg
> To: php-general@lists.php.net
> Sent: Wednesday, September 23, 2009 11:11:46 AM
> Subject: [PHP] Stricter Error Checking?
>
> Hello,
>
> I just spent way, way to much time trying to debug code due to a misnamed
> element. Here is a simplified ex
I think he meant that he is using 'Number' instead of 'Part_Number'
when accessing the array and not in the SQL, his SQL was correct, this
was wrong:
> echo $row['Number'];
E_STRICT catches that kind of error.
Jonathan
On Wed, Sep 23, 2009 at 3:28 PM, Tommy Pham wrote:
>
>
> - Original
From: Tommy Pham
>> From: Tim Legg
>>
>> I just spent way, way to much time trying to debug code due to a
misnamed
>> element. Here is a simplified example of the problem I dealt with.
>>
>>
>> $test = "SELECT * FROM `Materials` WHERE `Part_Number` =
'125664'";
>> $result = mysql_query
- Original Message
> From: Bob McConnell
> To: Tommy Pham ; php-general@lists.php.net
> Sent: Wednesday, September 23, 2009 11:37:00 AM
> Subject: RE: [PHP] Stricter Error Checking?
>
> From: Tommy Pham
> >> From: Tim Legg
> >>
> >> I just spent way, way to much time trying to debug cod
>> I think the problem is that he didn't check that the key he used
>> actually existed before using the value it pointed to. So he got an
>> empty string for $row['Number']; because the key should have been
>> 'Part_Number'. I don't know that even E_STRICT would catch that one.
>>
>> Bob McConnell
Bob McConnell wrote:
> From: Tommy Pham
>>> From: Tim Legg
>>>
>>> I just spent way, way to much time trying to debug code due to a
> misnamed
>>> element. Here is a simplified example of the problem I dealt with.
>>>
>>>
>>> $test = "SELECT * FROM `Materials` WHERE `Part_Number` =
> '125664'
Tim Legg wrote:
> Hello,
>
> I just spent way, way to much time trying to debug code due to a misnamed
> element. Here is a simplified example of the problem I dealt with.
>
>
> $test = "SELECT * FROM `Materials` WHERE `Part_Number` = '125664'";
> $result = mysql_query($test,$handl
Tim Legg wrote:
> Hello,
>
> I just spent way, way to much time trying to debug code due to a misnamed
> element. Here is a simplified example of the problem I dealt with.
>
>
> $test = "SELECT * FROM `Materials` WHERE `Part_Number` = '125664'";
> $result = mysql_query($test,$handl
there's a need for long timeouts in this app but could perhaps be reduced
from 6 to 3 hours.
the sessions are cookie based using php's 'file' handler and
session.cookie_lifetime=0. the server appears to have plenty of free memory
and appears not to have swapped in nearly a year of uptime. load ave
finaly we went with a custom cooky handling, however the customers
requirements where two days.
if u are shure that the server is still the same hardware like it has been 6
years ago then it might be some client stuff, however if there are other
applications, pages running (virtual servers) then i
Thanks so much for all the feedback! Ben's comment was something that
prompted this discussion to begin with internally, in that we didn't want to
reinvent the wheel, nor make a mistake in the security implenetation of our
solution. I've forwarded this thread back internally, and we'll take this
Better use mysqli rather mysql. It supports all new features of MySQL.
I solved the problem in following manner.
1. Detect the return value of mysqli->query function.
2. If it is FALSE get the error no, error msg etc and store in a Mysql table
for further review. You can also write it in a error
39 matches
Mail list logo