the php code

Posted on 2007-10-09
Last Modified: 2008-02-07
Why the code below they do like that whether  EW_USE_MYSQLI is exist or not it give the same thing
I get the code form some part of program

function Insert_ID()
            if (EW_USE_MYSQLI) {
                  return @mysqli_insert_id($this->connectionId);
            } else {
                  return @mysql_insert_id($this->connectionId);
Question by:teera
    LVL 28

    Accepted Solution

    Not the same, first one connect using mysqli
     the other one with mysql
    LVL 3

    Assisted Solution

    To expand on gamebits' answer. Mysqli and mysql are different database platforms. The script checks to see which one is in use so that it can query it properly.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to dynamically set the form action using jQuery.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now