fatal error call to undefined function last_insert_id Hubbardsville New York

Address 2622 Oneida St, Sauquoit, NY 13456
Phone (315) 792-9606
Website Link http://themacspert.com
Hours

fatal error call to undefined function last_insert_id Hubbardsville, New York

Advanced Search Forum PHP Help Database MySQL function problem If this is your first visit, be sure to check out the FAQ by clicking the link above. I'm not using the PHP function, because I'm not sure if it will return the correct ID if multiple users at the same time ads or updates data in the same and i usedLAST_INSERT_ID()function but i am getting this error PHP Fatal error: Call to undefined function LAST_INSERT_ID() this is my code: $sql But since all it does is run SELECT LAST_INSERT_ID(), you still need to call it before you run another INSERT to save that ID.

This forum is now closed to new posts, but you can browse existing content. Join them; it only takes a minute: Sign up MySQL- Why is LAST_INSERT_ID() not working for me? Developing web applications for long lifespan (20+ years) How to obtain the mean for a normal distribution given its quartiles? Join them; it only takes a minute: Sign up Call to undefined function last_insert_id() [duplicate] up vote -1 down vote favorite This question already has an answer here: How do I

share|improve this answer answered Jan 9 '10 at 12:43 Kris Krause 5,49411626 add a comment| up vote 0 down vote I agree with whoever says you should use mysql_insert_id, but if We have below code that works on our localhost (usbwebserver and a testserver with an hoster A). How? Developing web applications for long lifespan (20+ years) House of Santa Claus Is it OK for graduate students to draft the research proposal for their advisor’s funding application (like NIH’s or

Players stopping other player actions Appease Your Google Overlords: Draw the "G" Logo "Rollbacked" or "rolled back" the edit? But changed to insert_id and excellent it worked. should it be: $this->db->insert_id(); $inserted_id = $this->db->insert_id(); Jun 10, 2009,18:32 #8 Dan Grossman View Profile View Forum Posts Follow Me On Twitter: @djg Join Date Aug 2000 Location Philadephia, PA Posts Did Sputnik 1 have attitude control?

share|improve this answer answered Dec 1 '13 at 9:12 Mat 135k21234273 "last_insert_id" doesn't exist, not even in mysql. :) –deceze Dec 1 '13 at 9:15 Not sure To start viewing messages, select the forum that you want to visit from the selection below. You should turn up error reporting so you can see the errors instead of a blank page. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

You want it to be a function call. –Bill Karwin Feb 27 '12 at 19:26 add a comment| up vote 0 down vote SELECT LAST_INSERT_ID(); If I were you. Still not working. What can be wrong? Loading Login Register FAQ Search It is currently Sat Oct 15, 2016 9:17 am View unanswered posts | View active topics Board index All times are UTC -

Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders What's New? And it's what I've always used, actually ^^ –Pascal MARTIN Jan 9 '10 at 12:51 add a comment| up vote 1 down vote The guys have already answered that you were Try Improvely, your online marketing dashboard. → Conversion tracking, click fraud detection, A/B testing and more Jun 10, 2009,02:27 #3 seanj View Profile View Forum Posts SitePoint Member Join Date May How to get this substring on bash script?

Does chilli get milder with cooking? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Not the answer you're looking for? I've tried, but I'm not able to prcess queries then.

You can find out more information about the move and how to open a new account (if necessary) here. Is it possible to have a planet unsuitable for agriculture? Developing web applications for long lifespan (20+ years) How is the Heartbleed exploit even possible? Thread Closed -------------------- Private Messages User Control Panel Who's Online Search Forum Home General -- News & Discussion -- Lounge -- Events -- Regional User

You should first execute the query then call last_insert_id function –Tarun Dec 1 '13 at 9:11 us3.php.net/mysqli_insert_id –Hanky Panky Dec 1 '13 at 9:12 add a comment| 1 Answer At minimum, this will at least confirm or deny correct sql syntax. Players stopping other player actions Going to be away for 4 months, should we turn off the refrigerator or leave it on with water inside? Try Improvely, your online marketing dashboard. → Conversion tracking, click fraud detection, A/B testing and more Jun 10, 2009,18:24 #7 seanj View Profile View Forum Posts SitePoint Member Join Date May

Cyberpunk story: Black samurai, skateboarding courier, Mafia selling pizza and Sumerian goddess as a computer virus How would you help a snapping turtle cross the road? Results 1 to 3 of 3 Thread: MySQL function problem Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode The result of this function is not affected by any of the following: A single row INSERT statement with a VALUES clause for a table without an identity column. Exploded Suffixes What are "desires of the flesh"?

The time now is 10:17 AM. Linear Mode Threaded Mode View a Printable Version Subscribe to this thread Add Poll to this thread Send thread to a friend By browsing this website you accept that we set All fields are mandatory"; echo '
'; } else { $con = mysqli_connect(); //removed for privacy if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . However on the server of another hoster (Hoster B) it aint working.

There is a wrapper function for this, mysql_insert_id(). Will test this next time I do some refactoring :) –Steven Feb 27 '12 at 18:42 Probably the INSERT failed because you put NOW() inside quotes, making it a