the php code

Posted on 2007-10-09
Medium Priority
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

gamebits earned 800 total points
ID: 20046093
Not the same, first one connect using mysqli
 the other one with mysql

Assisted Solution

frindo earned 800 total points
ID: 20046142
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.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 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