Skip to content

LAST_INSERT_ID not working on UPDATE

if I use this SQL: UPDATE formulare SET EV_id=59, EV_status=5 WHERE EV_id=57 AND ID_uziv=12;SELECT LAST_INSERT_ID(); I will get 0 as last insert id. I’m using php mysqli_insert_id and here is said …

“ru_RU” (russian) setlocale not working on date and time

I am trying to use Russian language with setlocale: Output is : Thursday, August 29 Expected is : четверг, РђРІРіСѓСЃС‚ 29 Any help would be highly appreciated. Answer Found it! if you are using Linux hosting then try: will works fine. In case you are using windows hosting then try:…

composer does not generate autoload.php

i install composer for windows using this link http://getcomposer.org/download/ > http://getcomposer.org/Composer-Setup.exe my web server is WAMP php 5.4 with openssl enabled. i created composer.json with this code and run with this code in .php file and i got error Warning: require_once(vendor/autoload.ph…

Php Regex: how to match repeated patterns

given following text I need to capture columns values. I thought something about these lines: But unfortunately it captures only first column. Any suggestion? Thanks ` ====EDIT==== Just to be clear: i know that i could preg_match searching for d+ values or split the whole string in lines and run explode on th…

PHP Warning: Division by zero

I’m learning php and built an experimental form-based calculator (also using html & POST method) that returns values to a table. The calculator is functional when I enter my values and click submit, but I keep getting two “Division by zero” errors on the last line when I first run the co…