Posts

Mysql find max column value based on array list -

Image
hi have following mysql table id item_name user_id wishlist item_url id_category cost 30 kiko 76 1 70 10 31 test1 76 1 70 20 32 test12 76 1 68,67 30 how can max cost item. means need max cost item based on category id. my attempt of using select max(cost),id item_tbl (find_in_set('68','70,68,67')) not return correct output thought gives max(cost) of 30. this might give desired output. select id_category, max(cost) item_tbl group id_category;

mysql - SPLIT_STR not working with the foreign languages -

i got function split_str blog.fedecarg.com here code create function split_str( x varchar(255), delim varchar(12), pos int ) returns varchar(255) return replace(substring(substring_index(x, delim, pos), length(substring_index(x, delim, pos -1)) + 1), delim, ''); if try select like select split_str('accountname;โอมtest;no.454646;i;2013-8-23', ';' , 2) 'res'; the result is _________________ | res | | ------------- | | โอมtest | _________________ if change index 3 select split_str('accountname;โอมtest;no.454646;i;2013-8-23', ';' , 3) 'res'; the expected value no.454646 but result is _________________ | res | | ------------- | | 4646 | _________________ is function split_str has bug? note : if cut foreign languages( โอม ) out. problem solved. how can use function working foreign languages, please help. thanks. length returns string le...

java - UNION operator with QueryBuilder -

i want create select statement, union of 2 sub-queries. there way in ormlite create 2 queries querybuilder , , concatenate them , create union third querybuilder : select * ( first select union second select) isdefault = 0 order somerow; somerow changes dinamically. as know querybuilder not support union directly, somehow should inject concatenated union statement. result want list<myobject> querybuilder.query() returns it.

How do I get my HTML file from a text file to the web? -

i new programming , have learned lots of html, css , javascript i'd practice with. have put test pages in textwrangler, cannot work out way publish them free can practice. working on 2010 mac. i have looked @ various youtube videos, far have not been able work out how text file on computer @ least preview of page. appreciate advice on free publishing method. many thanks, rachael there several ways publish files: create file ending .html , doubleclick it. standard browser open. (e.g. php not available.) install apache server localhost on pc. php, mysql db, etc. available. create free account @ e.g. lima-city.de or anywhere else. upload files , test it.

html - Change certain <ul> and <li> (jQuery) -

i'm starting learn how code jquery, javascript , on , wanted ask if it's possible change few <ul> , <li> <div> , <p> . i heard plugins used , 1 of biggest advantages of jquery thought i'd try build 1 myself. unfortunately i'm new programming don't know important stuff. at moment plugin turns every <div> <ul> , goal change menu not moveable box. @ moment script changes , moveable div turns ul buttons dissapear. my html file has menu , box moveable 2 buttons inside. <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>list</title> <script type="text/javascript" src="jquery-1.10.2.js"> ...

Splash Screen In Windows 7 using cordova -

i'm using visual stdio 2010 , phone gap 2.9.0 version . i want change default splash screen new image in windows 7 mobile app. how ...? you can replace image same name (i.e splashscreenimage.jpg) same dimensions i.e 480x800. hope helps

android - Receiving in app SMS messages only from certain specified numbers -

i've set app receive sms messages , display them toast on main activity. once app has received sms abort broadcast , stop message going inbox. currently messages phone receives carry out job , display toast when sms received specific number. know case of putting if statement receiver code i'm not sure abouts should placed. smsreceiver.java: public class smsreceiver extends broadcastreceiver { @override public void onreceive(context context, intent intent) { bundle extras = intent.getextras(); if (extras ==null) return; //toast toast.maketext(context, "received", toast.length_long).show(); object[] pdus = (object[]) extras.get("pdus"); (int = 0; < pdus.length; i++) { smsmessage smessage = smsmessage.createfrompdu((byte[]) pdus[i]); string sender = smessage.getoriginatingaddress(); string body = smessage.getmessagebody().tostring(); intent in = new intent("smsmessage.intent....