Re: [PHP] Last Record INSERT

2013-06-26 Thread Dan Munro
Learning something new everyday is one of the joys of this profession. If
you learn two new things, consider yourself lucky :)


On Wed, Jun 26, 2013 at 11:03 AM, Samuel Lopes Grigolato <
samuel.grigol...@gmail.com> wrote:

> AFAIK "mysql_[...]" is deprecated in favor of "mysqli_[...]" correspondent
> functions, there's nothing to do specifically with mysql[i]_insert_id.
>
>
> On Wed, Jun 26, 2013 at 3:01 PM, Tedd Sperling  >wrote:
>
> > On Jun 26, 2013, at 1:56 PM, Stuart Dallas  wrote:
> > > On Wednesday, 26 June 2013 at 18:39, Tedd Sperling wrote:
> > >> Let me add, currently I am inserting an email address into a database.
> > >>
> > >> To find which record was created, I ask for the record number (ID)
> back.
> > >>
> > >> I am asking simply because mysql_insert_id() is deprecated.
> >
> > Now you tell me. :-)
> >
> > I learn something new every day of my life... and I'm getting damned
> tried
> > of it.
> >
> > Back to the books.
> >
> > Thanks.
> >
> > Cheers,
> >
> > tedd
> >
> > _____
> > tedd.sperl...@gmail.com
> > http://sperling.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>



-- 
>From the desk of Dan Munro


Re: [PHP] PHP vs JAVA

2013-08-20 Thread Dan Munro
> 1. There are no statement terminators. Lose your indentation for ANY
> reason and your program is well and truly screwed, in ways you can't
> imagine.
>
> 2. Python programs fail in the most ungraceful way I've ever seen in an
> interpreted programming language.

1. Indent properly. In php, if you put an open or close brace out of place
your code will break in unexpected ways as well. If it's hard to tell if
something is indented properly, your code should be refactored so that it
is.

2. In my experience this has a lot to do with how some people use python
and not python itself.


On Tue, Aug 20, 2013 at 12:12 PM, Tedd Sperling wrote:

> On Aug 20, 2013, at 12:24 PM, Paul M Foster 
> wrote:
>
> > On Tue, Aug 20, 2013 at 05:09:37PM +0100, Lester Caine wrote:
> >
> >> shiplu wrote:
> >>> During PHPvsPython search I found this info graphic
> >>> https://www.udemy.com/blog/modern-language-wars/#. Some of the
> >>> statistics contain Java too. Also you can search "PHP" and "Web
> >>> Development" in big job sites and compare with same search but with
> >>> "Java".
> >>
> >> 'Python is arguably the most readable programming language' probably
> >> says it all? Personally I find it almost impossible to understand
> >> when coming in cold to someone elses code ... Java is not much
> >> better ... but I still have to persist with both since some key
> >> elements of a usable PHP IDE now rely on both :(
> >
> > Python may be "most readable", but it's a huge fail for two reasons:
> >
> > 1. There are no statement terminators. Lose your indentation for ANY
> > reason and your program is well and truly screwed, in ways you can't
> > imagine.
> >
> > 2. Python programs fail in the most ungraceful way I've ever seen in an
> > interpreted programming language.
>
> And no ternary operator.
>
> tedd
>
> ___
> tedd sperling
> tedd.sperl...@gmail.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
>From the desk of Dan Munro


Re: [PHP] PHP vs JAVA

2013-08-20 Thread Dan Munro
> in my opinion, that would be like asking "how big is the internet?".

http://www.washingtonpost.com/blogs/the-switch/wp/2013/08/18/heres-what-you-find-when-you-scan-the-entire-internet-in-an-hour/


On Tue, Aug 20, 2013 at 1:08 PM, Sebastian Krebs wrote:

> 2013/8/20 Steven Staples 
>
> > > My recent question was simply an attempt to get documentation to
> support
> > > which server-side Web Language is the most popular. Both PHP and Java
> can
> > > be used server-side.
> > >
> > > I also realize that Java is used for native Android because I also
> teach
> > > Mobile Application Development (MAD -- I even coined the name). So, I
> am
> > up
> > > to my butt in languages (and people who think different than me) -- I'm
> > > just trying to get documentation to back up my what I think I know.
> >
> > Well, technically any language can be used server side, it is all on how
> > you
> > set up your server, no?
> >
>
> No. But since node.js I lack an example :D But of course you need the
> "link" between the language and the network.
>
>
> >
> > I would tend to think that the biggest out there, is
> html/php/javascript...
> > and next to that, would be asp, and then java.   Do I have proof of this?
> > No, can I get proof, I doubt it, and are there stats on this? To be
> honest,
> > in my opinion, that would be like asking "how big is the internet?".  It
> is
> > virtually an immeasurable object.  There are so many websites out there,
> > that you can't search them all...
> >
>
> Of course you cannot search them _all_, but again the link:
> http://w3techs.com/technologies/overview/programming_language/all
> There are good hints, how "the internet looks like". For example a hoster
> can simply look at the products he sell. Services like w3techs.com use the
> reports from the server themself (in most cases the headers), or the
> file-ending (doesn't work anymore that good, since most sites hide them ;))
> and extrapolate this.
> Of course they are not exact, but I think they show the direction quite
> accurate.
>
>
> >
> > PHP is simple, and yet powerful to use, and is pretty much the standard
> for
> > all hosting companies.
> >
> > Now, there is this link...
> > http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
> >
> > It shows Java as #1, and php as #5, but this is also for PROGRAMMING,
> does
> > not specify web based programming vs desktop vs MAD (thanks tedd ;) ) so
> > the
> > numbers do not really speak out in this application.
> >
>
> Also it is the Tiobe-Index. Although it is widely-referenced, the way it
> calculates their rankings is ... interesting. In fact it only tells you how
> "loud" a community around a specific language is. So for example maybe Java
> is #1, because it is so complex, that it leads to many questions in forums
> and on stackoverflow. Or PHP is "only" #5, because most communication is on
> IRC, or mailinglists. (disclaimer: Of course I faked this examples.
> Actually I have no idea how the communities around Java and PHP "as a
> whole" interacts primary, but I don't think, that they are all equal).
> I just think, that the Tiobe-Index has a completely different view on "what
> is a popular language", than I have.
>
>
> >
> > Does it really matter?   PHP is very huge, widely used, and I would even
> go
> > so far as to say the 'norm' for website developers, and hosting
> providers.
> >
>
> Nope, it doesn't matter :)
>
>
> >
> > But that is my $0.02, and for me, I have been with PHP for 7 years
> > professionally, and in college I took VB.net, ASP.net, C++, JAVA and PHP.
> > Only recently have I gotten into C# for desktop applications.
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> github.com/KingCrunch
>



-- 
>From the desk of Dan Munro


Re: [PHP] PHP vs JAVA

2013-08-20 Thread Dan Munro
Zmap works by being stateless, so while nmap records which requests go out,
zmap "fires and forgets", and encodes the request in such a way that the
response can provide whatever details it needs to continue the scan. No
magic here.


On Tue, Aug 20, 2013 at 2:28 PM, Lester Caine  wrote:

> Tedd Sperling wrote:
>
>> I'm just trying to get documentation to back up my what I think I know.
>>
>
> http://en.wikipedia.org/wiki/**Programming_languages_used_in_**
> most_popular_websites<http://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites>may
>  be a better starting point, but there are no citations to the facts,
> they are a little dated, and some sites are a little biased in their
> choices? Move to the top 40 sites and PHP fares a little better -
> http://rogchap.com/2011/09/06/**top-40-website-programming-**languages/<http://rogchap.com/2011/09/06/top-40-website-programming-languages/>but
>  but this data is a little dataed now.   Personally I've always used the
> W3techs figures when I'm doing talks as it is the only consistent source
> I've found. The netcraft figures would be nice but they only run this
> intermittently, and last January's figure of 244 million sites at 39% of
> machines seems a little at odds with the W3techs ones? http://w3techs.com/
> **technologies/history_overview/**programming_language<http://w3techs.com/technologies/history_overview/programming_language>continues
>  to show PHP rising at the expense of ASP and Java with Perl, Ruby
> and Python having trouble to stay above 1% combined over the last year.
>
>
> --
> Lester Caine - G8HFL
> -
> Contact - 
> http://lsces.co.uk/wiki/?page=**contact<http://lsces.co.uk/wiki/?page=contact>
>
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media - 
> http://rainbowdigitalmedia.co.**uk<http://rainbowdigitalmedia.co.uk>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
>From the desk of Dan Munro