On Tue, Feb 22, 2011 at 1:07 PM, Florin Jurcovici
wrote:
> Hi.
>
> I use PDO and have written myself a class to abstract the database a bit.
>
> It has a method for querying the database specifically for large
> objects, like this:
>
> $connection = $this->getConnection(); // what
rming query: " .
mysql_error() . "");
}
print "\n";
print "\n";
}
?>
Would appriciate your help.
Thank you.
--
Gary
__ Information from ESET Smart Security, version of virus signature
database 5897 (20110222) __
The message was checked by ESET Smart Security.
http://www.eset.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi.
The code I use to extract the data from a query which was just
performed looks like this:
$data = array();
$receiverRow = array();
$i = 0;
foreach ($columns as $column => $type)
$statement->bindColumn($i++
Hi.
I use PDO and have written myself a class to abstract the database a bit.
It has a method for querying the database specifically for large
objects, like this:
$connection = $this->getConnection(); // what's returned is a
PDOStatement, and a transaction is already started
On 2/22/11 12:04 PM, Alexis wrote:
On 22/02/11 09:40, Dotan Cohen wrote:
On Tue, Feb 22, 2011 at 16:15, Robert Cummings
wrote:
If you switch to vertically aligned braces you will have an easier time
matching up open and close braces...
if (something)
{
// Code here
}
It's trivial to match us
On 22/02/11 09:40, Dotan Cohen wrote:
On Tue, Feb 22, 2011 at 16:15, Robert Cummings wrote:
If you switch to vertically aligned braces you will have an easier time
matching up open and close braces...
if (something)
{
// Code here
}
It's trivial to match using this style since you only
On Tue, Feb 22, 2011 at 01:29:30PM +0200, Dotan Cohen wrote:
> I wrote a short page on how to actually type of code that one writes,
> it can be found here:
> http://dotancohen.com/howto/write_code.html
>
> The point that I stress on the page is that first you close an
> element, then you fill it
On Tue, Feb 22, 2011 at 16:15, Robert Cummings wrote:
> If you switch to vertically aligned braces you will have an easier time
> matching up open and close braces...
>
> if (something)
> {
> // Code here
> }
>
> It's trivial to match using this style since you only need to scan one axis.
>
Th
Le 19/02/2011 0:23, Tommy Pham a écrit :
@Simon,
Thanks for explaining about the [^href]. I need to read up more about
greediness. I thought I understood it but guess not.
@Peter,
I tried your pattern but it didn't capture all of my new test cases.
Also, it captures the single/double quotes
gt;> www.justcroft.com
>>> Justcroft House, High Street, Staplehurst, Kent TN12 0AH United
>>> Kingdom
>>> Registered in England and Wales: 2297906
>>> Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17
>>> 1XS
>
On 11-02-22 09:06 AM, Dotan Cohen wrote:
On Tue, Feb 22, 2011 at 14:58, Robert Cummings wrote:
I'm more likely to do this stuff for HTML than PHP. However, I do sometimes
lay out the structure of some conditionals/functions before fleshing them
out so that I can do some early testing... but I
On 11-02-22 08:58 AM, Dotan Cohen wrote:
On Tue, Feb 22, 2011 at 14:11, Jay Blanchard wrote:
It is an interesting concept Dotan, what is the goal? Who is the page
targeted to?
The goal is to have every open and close bracket matched, and not have
to worry about what is still open.
This is
orked fine.
I have tried count() as well as mysql_num_rows() but am getting the same
result.
Could you explain what you mean by count them as I go?
Again, Thank you for your reply.
Gary
__ Information from ESET Smart Security, version of virus signature
database 5895 (20110222) _
On Tue, Feb 22, 2011 at 15:00, Andy McKenzie wrote:
> I'll be the first to tell you that I'm not a great programmer, so my
> take may not be worth a lot. However, this is pretty close to how I
> write. Not exactly, but close. I also always label open and closing
> brackets on everything, unless
On Tue, Feb 22, 2011 at 14:58, Robert Cummings wrote:
> I'm more likely to do this stuff for HTML than PHP. However, I do sometimes
> lay out the structure of some conditionals/functions before fleshing them
> out so that I can do some early testing... but I always fill the conditional
> as I'm do
On Tue, Feb 22, 2011 at 14:15, Marc Guay wrote:
> It's an interesting idea (a different take on coding best practices)
> but I find the PHP example to be laborious and time consuming with
> little benefit. If I'm typing an IF statement, I hope to god I know
> what the condition is before I start
Peter
Thank you for your reply.
I did notice that I had the $county_total=mysql_num_rows($result) twice. I
had moved and removed it, always getting either a 0 or 1 result.
I put up another test page with
$result = mysql_query("SELECT * FROM `counties` ") or die(mysql_error(
On Tue, Feb 22, 2011 at 14:11, Jay Blanchard wrote:
> It is an interesting concept Dotan, what is the goal? Who is the page
> targeted to?
>
The goal is to have every open and close bracket matched, and not have
to worry about what is still open.
The page was specifically written for a friend wh
nty_total";
>>
>> echo 'You Have ' . "$county_total" . ' Counties ';
>>
>> ?>
>
> Best regards,
> --
> Daniel Molina Wegener
> System Programmer & Web Developer
> Phone: +56 (2) 979-0277 | Blog: http://coder.cl/
"$county_total";
>>
>> echo 'You Have ' . "$county_total" . ' Counties ';
>>
>> ?>
>> --
>> Gary
Thanks for your reply.
I'm curious, how did you try it locally without a database?
I am still getting either a 0 or a 1 for a result.
Gary
__ Information from ESET Smart Security, version of virus signature
database 5895 (20110222) __
The message was checked by ESET Smart Security.
http://www.eset.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Feb 22, 2011 at 6:29 AM, Dotan Cohen wrote:
> I wrote a short page on how to actually type of code that one writes,
> it can be found here:
> http://dotancohen.com/howto/write_code.html
>
> The point that I stress on the page is that first you close an
> element, then you fill it's content
On 11-02-22 06:29 AM, Dotan Cohen wrote:
I wrote a short page on how to actually type of code that one writes,
it can be found here:
http://dotancohen.com/howto/write_code.html
The point that I stress on the page is that first you close an
element, then you fill it's contents. The page has examp
On 22/02/11 05:40, Gary wrote:
Can someone tell me why this is not working? I do not get an error message,
the results are called and echo'd to screen, the count does not work, I get
a 0 for a result...
$result = mysql_query("SELECT * FROM `counties` WHERE name = 'checked'") or
die(mysql_erro
Hello Gary,
Please wrap $i in braces in your variable variable:
if ( isset($_POST["county{$i}"] ) ) {
echo "You have chosen ". $_POST["county{$i}"]." ";
--
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/
It's an interesting idea (a different take on coding best practices)
but I find the PHP example to be laborious and time consuming with
little benefit. If I'm typing an IF statement, I hope to god I know
what the condition is before I start typing it. Creating the if/else
structure first and then
[snip]
The point that I stress on the page is that first you close an
element, then you fill it's contents. The page has examples in HTML
and PHP. I would like to know what the experienced programmers here
think about this. Am I going about it wrong?
[/snip]
It is an interesting concept Dotan, wha
On Tuesday 22 February 2011,
"Gary" wrote:
> Can someone tell me why this is not working? I do not get an error
> message, the results are called and echo'd to screen, the count does not
> work, I get a 0 for a result...
Are you sure that the table is called `counties` and not `countries`?
27 matches
Mail list logo