[Solved] get the total values of different user in mysql and php [closed]

[ad_1] SELECT MIN(a.ID) ID, a.name, SUM(b.Price) Price FROM table1 a INNER JOIN table2 b ON a.PID = b.PID GROUP BY a.Name SQLFiddle Demo OUTPUT ╔════╦══════╦═══════╗ ║ ID ║ NAME ║ PRICE ║ ╠════╬══════╬═══════╣ ║ 1 ║ ram ║ 4333 ║ ║ 2 ║ rani ║ 2000 ║ ╚════╩══════╩═══════╝ [ad_2] solved get the total values of … Read more

[Solved] Mysql display random 4 users with more than 5 articles

[ad_1] I’ve mocked up some table data to test my query. WHERE clauses must be positioned after JOINs. You are also a little ambiguous about the comparison of COUNT AND 5 — if you want more than 5 then >5, if you want 5 or more then >=5. SQL: (SQLFiddle Demo) SELECT a.user_id,a.username,COUNT(b.user_id) FROM users … Read more

[Solved] Server data accessing from non local network without port forwarding

[ad_1] Yes, it’s possible to access the web server from an external network, depending on your current network configuration. There are two simple solutions I think would suit you. Configure your firewall if needed, enable port forwarding in your router settings to forward port 80 to the internal IP of the machine running your XAMPP-server. … Read more

[Solved] mysql_fetch_array -> 2 mysql queries

[ad_1] You only need one function, run a join in your query SELECT customer_id, name FROM customer_ids INNER JOIN customers ON customer_ids.customer_identify = customers.identify This should get the required fields then jun run your loop normally 0 [ad_2] solved mysql_fetch_array -> 2 mysql queries

[Solved] How to upload file using ajax/jQuery with Symfony2

[ad_1] Firstly, I notice that your click event for #upload_image fires a click trigger on #bundle_user_file, but below that you are asking it to look for a change event. Therefore, this would do nothing. You can re-generate a CSRF token if you want by calling the csrf token_manager service by doing this: /** @var \Symfony\Component\Security\Csrf\CsrfTokenManagerInterface … Read more

[Solved] Using insert with condition on laravel [closed]

[ad_1] Well the reason it inserts twice is you make an DB::insert() and also create a new book using $book->save() This should work better: $book = new Book; $ta = DB::table(‘book’)->selectRaw(‘MAX(ta) AS ta’)->first()->ta; if($ta == 0){ $book->ta = 1; $book->tb = 1; } else { $tb = DB::table(‘book’)->selectRaw(‘MAX(tb) AS tb’) ->where(‘ta’, $ta)->first()->tb; if($tb <= 20){ … Read more

[Solved] Scraping web pages with Python vs PHP? [closed]

[ad_1] In my opinion, I would go with python, because of its excellent string handling capabilities compared to PHP. Also there are a lot of cool libraries that python has , that make Scraping web pages a bliss. Some libraries you should check out are : Beautiful soup Scrappy I have personally used BeautifulSoup and … Read more

[Solved] Website Query, php [closed]

[ad_1] one way to do it would be to use googles API. http://code.google.com/intl/de/apis/ajax/documentation/ google.loader.ClientLocation another way to do it to use this: http://www.maxmind.com/app/ip-location 1 [ad_2] solved Website Query, php [closed]

[Solved] Convert this PHP code to C# Rijndael Algorithm

[ad_1] Nay sayers and doom mongers, behold! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; using System.IO; using System.Web; namespace EncryptData { class EncryptData { private static readonly Encoding ASCII_ENCODING = new System.Text.ASCIIEncoding(); private static string md5(string text) { return BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(ASCII_ENCODING.GetBytes(text))).Replace(“-“, “”).ToLower(); } public abstract string nonce(); public abstract string salt(); public … Read more