Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > [SQL] รวม Field จาก column ที่สร้างขึ้นเอง ช่วยทีครับ



 

[SQL] รวม Field จาก column ที่สร้างขึ้นเอง ช่วยทีครับ

 



Topic : 111213



โพสกระทู้ ( 174 )
บทความ ( 0 )



สถานะออฟไลน์




ต้องการรวมฟิว จากเงื่อนไข WHERE ให้มาเป็นบรรทัดเดียวสามารถทำได้หรือไม่ครับ
ควรใช้คำสั่งหรือสร้างอะไรเพิ่มเติมบ้างครับ

ปล.ต้องการเปรียบเทียบราคาในช่องเดียวครับ

sum



Tag : .NET, Ms SQL Server 2005, VS 2010 (.NET 4.x)







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-09-10 12:03:52 By : nongpaoza View : 4430 Reply : 23
 

 

No. 1



โพสกระทู้ ( 296 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook

SELECT CONCAT(TABLE_Name.Field1,TABLE_Name.Field2) as Name1
FROM tblmember
WHERE
..............






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-10 16:48:13 By : zarooman
 


 

No. 2



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


Code (SQL)
;WITH cte1
AS (
	SELECT Sub_Price AS หอย1, ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS ห1
	FROM @yourTab WHERE Status = 1
	) , 
cte2 AS (
	SELECT Sub_Price AS หอย2, ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS ห2
	FROM  @yourTab WHERE Status = 2
	)
SELECT หอย1, หอย2, ROW_NUMBER() OVER (ORDER BY (SELECT 1))  AS จุดรวมหอย
FROM cte1 FULL JOIN cte2 ON cte1.ห1 = cte2.ห2




ปล. ROW_NUMBER() OVER (ORDER BY (SELECT 1)) == Select Doc_NO From @youTab Group By Doc_NO
และจำนวนรายการของ ห1 จะเท่ากับ ห2 เสมอ (ขึ้นอยู่กับ MAX(ห1หรือห2)

***** ;WITH CTE หรือเข้าใจว่ามันคือ Sub Query นั่นแหละครับ (จริงฯมันมีมากกว่านั้น)


หรือคุณจะใช้คำสั่ง CROSS APPLY (Select TOP 1 FROM @yourTab ก็ได้ผลลัพธ์เหมือนกัน)


ประวัติการแก้ไข
2014-09-11 06:53:31
2014-09-11 07:00:16
2014-09-11 07:02:39
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-11 06:41:54 By : หน้าฮี
 

 

No. 3



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


จาก #NO 2 คุณจะเขียนแบบอื่นก็ได้นะครับ แล้วแต่กรณีฯไป อทิเช่น เช็ค COALACE(n, m, n, ...)

JQUERY $.ajax มันเยี่ยมยอด แต่มันตอบโจทย์ของผมไม่ได้ทั้งหมด
(ค่าบางอย่างที่ Client และค่าบางอย่างที่ Server มันมีค่าไม่เท่ากัน)

มาวันนี้ผมพึ่งเข้าใจ (ผมโง่อยู่ตั้งนานนม) ผมคงต้องเลิกใช้แบบนี้ เช่น
Code (JavaScript)
function getIC_Doors( door) {
    //console.log('ปลากระป๋องตรา สามหอย.');
   // เลิกใช้ $.ajax()
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "somePage.aspx/GetCarsByDoors",
        data: "{doors: " +  7 + "}",
        dataType: "json",
        success: function (response) {
            var cars = response.d;
            $.each(cars, function (index, cars) {
                alert(cars.MakeNotLove);
            });
            alert('Success');
        },
        error: function () {
            alert('error');
        }
    });
}




ปล. Implements System.Web.UI.ICallbackEventHandler
ผมเลือกใช้ตัวนี้ทดแทน $.ajax() (ความสามารถของมันด้อยกว่า $.ajax() อยู่มากโข)


ประวัติการแก้ไข
2014-09-11 08:29:52
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-11 08:25:42 By : หน้าฮี
 


 

No. 4



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


@minivet,@ zarooman

บางอย่าง/บางครั้ง/บ่อยครั้ง ผมยกตัวอย่างเพื่อประกอบความเข้าใจของผมเอง
--- SQL Query ด้านบน ผมทำประกอบเพื่อตอบโจทย์ของพวกคุณ
--- SQL Qeury จริงของผม ไม่ได้เป็นแบบนี้ครับ (ง่ายกว่านี้เยอะเลย) เพราะอะไรรู้ไหม?
--- SQL Qeury ชีวิตจริงของผม ไม่ได้เป็นแบบนี้ครับ (ง่ายกว่านี้) เพราะอะไรรู้ไหม?
------- นาฬิกา "ชีวิต" ของผมมันสูญเสียไปแล้ว ยกตัวอย่างเพื่อให้เข้าใจ
----------- ปรกติคนทั่วไปนอน 06:00 PM --- 05:00 AM ของวันไหม่
-------------- ...
-------------- ...
-------------- ...
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-11 10:09:38 By : หน้าฮี
 


 

No. 5



โพสกระทู้ ( 296 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook

Thank ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-11 11:41:06 By : zarooman
 


 

No. 6



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


@minivet,@ zarooman

ผมมีข้อสงสัยที่มีประโยชน์สำหรับคุณทั้งสองคนครับ
---- ตามธรรมชาติของข้อมูล Filed Status มันจะต้องมีมากกว่านี้ เผลอฯ แยกออกไปอีกหนึ่งตาราง Table Status ดังนี้
---- Table Quotation_Status
---- SID, SDesc
----- 1 ราคา1
----- 2 ราคา 2
----- 3 ราคา 3
...
...
----- n ราคา n

ผมถามกลับว่า SQL Query ข้างบนมันจะต้องเปลี่ยนแปลง/แก้ไข อย่างไร? (ผมใช้คำว่า Dynamic ก็แล้วกันครับ)
คำว่า Dynamic ความหมายคือเปิดโอกาสให้ Users แก้ไขได้ อทิเช่น Dynamic SQL Query, Dynamic Report

หรือถ้าผมใช้คำนี้อธิบายได้มันก็ยิ่งดีครับ Non formal Object/ Non formal Education


วันนี้ผมดีใจที่ผมสามารถทะลายกำแพงกั้นระหว่าง Windows Application/ Web Application ได้สำเร็จ(และสมบูรณ์แบบ)

ดูดีดีนะครับ หนึ่งรูปทดแทนแสนคำ หอยงามงาม ยังอยู่นะครับ ไม่ว่าจะ PostBack หรือ ไม่ PostBack

Client รับรุ้ และ Server รับรุ้ (IE, FireFox, Chrome, etc รับรู้หมด)

xUnlimitX

1. หมายความว่า ผมสามารถเอา ASP.NET ไปรันบน Client ได้ ถ้าผมต้องการ
--- เพื่ออะไร? เพื่อความรวดเร็วและให้ Users พึงพอใจ และแยกไม่ออกว่า กำลัง RUN Windows App/ Web App

2. ผมสามารถทะลายกำแพง ระหว่างอุปกรณ์และอุปกรณ์ อทิเช่น PC, NoteBook, Iphone, Ipad , etc ทั้งหลายแหล่
--- อันนี้ผมใช้ BootStrap 3
3. ผมสามารถทะลาย OS Anด๋อย, Windows Phone, Simbian, etc
...
...
...
...


ผมจะได้มีเวลาศึกษาวิชา บัญชี/กฏหมาย หรืออื่นฯ ขั้นสูงสุดต่อไป (โดยที่ผมไม่จำเป็นต้องศึกษา การเขียนโปรแกรม อย่างน้อย 3 ปียังได้เลยครับ)


ประวัติการแก้ไข
2014-09-11 20:26:07
2014-09-11 20:33:30
2014-09-11 20:41:57
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-11 20:19:06 By : หน้าฮี
 


 

No. 7



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


อันนี้คือของจริงเลยนะครับ (ไม่มีขายในเมืองไทยและผมไม่คิดจะขายด้วย)

x_not_thai_x
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-11 21:11:50 By : หน้าฮี
 


 

No. 8



โพสกระทู้ ( 174 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 6 เขียนโดย : หน้าฮี เมื่อวันที่ 2014-09-11 20:19:06
รายละเอียดของการตอบ ::
ขอบคุณครับพี่ ทำลายกำแพงอะไรก็ทำลายไป แต่อย่าทำลายเหมืองทองคำก็พอ
ผมสงสัยว่าคนแบบพี่ 1 ล้าน คน จะมี อยู่สักคนไหม นะครับ 5555555


ตอบความคิดเห็นที่ : 1 เขียนโดย : zarooman เมื่อวันที่ 2014-09-10 16:48:13
รายละเอียดของการตอบ ::
กำลังลองครับ ขอบคุณมากครับ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-12 10:22:15 By : nongpaoza
 


 

No. 9



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


จาก #NO 6 - 7 อันนี้เป็นงานเก็บตกของผม (ปรับปรุงแก้ไขเพื่อให้มันดียิ่งขึ้นไปอีก)
---- คำสั่ง SQL Query ไม่ว่าจะซับซ้อนแค่ไหน สำหรับผม ผมคิดแบบนี้ครับ "ประคองจู๋ฉี่" แต่สำหรับคนอื่นฯ ผมไม่ทราบ


อันนี้คืองานเก็บตกอีกอันหนึ่งที่ผมติดค้างเอาไว้ตั้งนานนม
(มีน้อยคนนักที่จะแก้ไขปัญหานี้ได้)

--- ระยะถ่างระหว่าง Items ของ ComboBox Control (HTML = Selection นั่นแหละครับ)

x_tmp_xx


ผมเลือกใช้ตัวนี้ AJAXControlToolkit (และเอามาปรับปรุงนิดหน่อย)
(www.codeplex.com/AJAXControlToolkit)

Code (C#)
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Globalization;
using System.Reflection;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using System.Web.UI.Design.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

[assembly: WebResource("ComboBox.ComboBox.css", "text/css", PerformSubstitution = true)]
[assembly: WebResource("ComboBox.arrow-down.gif", "image/gif")]
[assembly: System.Web.UI.WebResource("ComboBox.ComboBox.js", "application/x-javascript")]
[assembly: System.Web.UI.WebResource("ComboBox.ComboBox.debug.js", "application/x-javascript")]

namespace AjaxControlToolkit
{
    [SupportsEventValidation()]
    [ValidationProperty("SelectedItem")]
    [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
    [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
    [Designer(typeof(ComboBoxDesigner))]
    [Bindable(true, BindingDirection.TwoWay)]
    [DataBindingHandler(typeof(ListControlDataBindingHandler))]
    [DefaultEvent("SelectedIndexChanged")]
    [DefaultProperty("SelectedValue")]
    [ControlValueProperty("SelectedValue")]
    [ParseChildren(true, "Items")]
    [ToolboxData("<{0}:ComboBox runat=\"server\"></{0}:ComboBox>")]
    [ClientCssResource("ComboBox.ComboBox.css", LoadOrder = 1)]
    [ClientScriptResource("Sys.Extended.UI.ComboBox", "ComboBox.ComboBox.js")]
    [RequiredScript(typeof(ScriptControlBase), 2)]
    [RequiredScript(typeof(PopupExtender), 3)]
    [RequiredScript(typeof(CommonToolkitScripts), 4)]
    [ToolboxItem(Utility.ToolBoxItemTypeName)]
    [ToolboxBitmap(typeof(ComboBox), "ComboBox.ComboBox.ico")]
    public class ComboBox : ListControl, IScriptControl, IPostBackDataHandler, INamingContainer, IControlResolver
    {
        #region Fields

        private TextBox _textBoxControl;
        private ScriptManager _scriptManager;
        private ComboBoxButton _buttonControl;
        private HiddenField _hiddenFieldControl;
        private System.Web.UI.WebControls.BulletedList _optionListControl;
        private Table _comboTable;
        private TableRow _comboTableRow;
        private TableCell _comboTableTextBoxCell;
        private TableCell _comboTableButtonCell;
        private static readonly object EventItemInserting = new object();
        private static readonly object EventItemInserted = new object();

        #endregion

        #region Derived Properties

        protected virtual ScriptManager ScriptManager
        {
            set { _scriptManager = value; }
            get
            {
                if (_scriptManager == null)
                {
                    _scriptManager = ScriptManager.GetCurrent(this.Page);
                    if (_scriptManager == null)
                    {
#if NET40 || NET45
                        throw new HttpException(Properties.Resources_NET4.E_NoScriptManager);
#else
                        throw new HttpException(Properties.Resources.E_NoScriptManager);
#endif
                    }
                }
                return _scriptManager;
            }
        }

        protected virtual string ClientControlType
        {
            get
            {
                ClientScriptResourceAttribute attr = (ClientScriptResourceAttribute)
                    TypeDescriptor.GetAttributes(this)[typeof(ClientScriptResourceAttribute)];
                return attr.ComponentType;
            }
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
        public Control ResolveControl(string controlId)
        {
            return FindControl(controlId);
        }

        #endregion

        #region ComboBox Properties

        [Category("Layout")]
        [DefaultValue(typeof(ComboBoxRenderMode), "Inline")]
        [Description("Whether the ComboBox will render as a block or inline HTML element.")]
        public ComboBoxRenderMode RenderMode
        {
            set { ViewState["RenderMode"] = value; }
            get { return (ViewState["RenderMode"] == null) ? ComboBoxRenderMode.Inline : (ComboBoxRenderMode)ViewState["RenderMode"]; }
        }

        [Category("Behavior")]
        [DefaultValue(typeof(ComboBoxStyle), "DropDown")]
        [Description("Whether the ComboBox requires typed text to match an item in the list or allows new items to be created.")]
        //[ExtenderControlProperty]
        //[ClientPropertyName("dropDownStyle")]
        public virtual ComboBoxStyle DropDownStyle
        {
            set { ViewState["DropDownStyle"] = value; }
            get
            {
                object o = ViewState["DropDownStyle"];
                return (o != null) ? (ComboBoxStyle)o : ComboBoxStyle.DropDown;
            }
        }

        [Category("Behavior")]
        [DefaultValue(typeof(ComboBoxAutoCompleteMode), "None")]
        [Description("Whether the ComboBox auto-completes typing by suggesting an item in the list or appending matches as the user types.")]
        public virtual ComboBoxAutoCompleteMode AutoCompleteMode
        {
            set { ViewState["AutoCompleteMode"] = value; }
            get
            {
                object o = ViewState["AutoCompleteMode"];
                return (o != null) ? (ComboBoxAutoCompleteMode)o : ComboBoxAutoCompleteMode.None;
            }
        }

        [Category("Behavior")]
        [DefaultValue(typeof(ComboBoxItemInsertLocation), "Append")]
        [Description("Whether a new item will be appended, prepended, or inserted ordinally into the items collection.")]
        public virtual ComboBoxItemInsertLocation ItemInsertLocation
        {
            set { ViewState["ItemInsertLocation"] = value; }
            get
            {
                object o = ViewState["ItemInsertLocation"];
                return (o != null) ? (ComboBoxItemInsertLocation)o : ComboBoxItemInsertLocation.Append;
            }
        }

        [Category("Behavior")]
        [DefaultValue(false)]
        [Description("Whether the ComboBox auto-completes user typing on a case-sensitive basis.")]
        [ExtenderControlProperty]
        [ClientPropertyName("caseSensitive")]
        public virtual bool CaseSensitive
        {
            set { ViewState["CaseSensitive"] = value; }
            get
            {
                object o = ViewState["CaseSensitive"];
                return (o != null) ? (bool)o : false;
            }
        }

        [Category("Style")]
        [DefaultValue("")]
        [Description("The CSS class to apply to a hovered item in the list.")]
        [ExtenderControlProperty]
        [ClientPropertyName("listItemHoverCssClass")]
        public virtual string ListItemHoverCssClass
        {
            set { ViewState["ListItemHoverCssClass"] = value; }
            get
            {
                object o = ViewState["ListItemHoverCssClass"];
                return (o != null) ? (string)o : "";
            }
        }

        #endregion

        #region ListControl Properties

        [ExtenderControlProperty]
        [ClientPropertyName("selectedIndex")]
        public override int SelectedIndex
        {
            get
            {
                int selectedIndex = base.SelectedIndex;
                //if ((selectedIndex < 0) && (this.Items.Count > 0))
                //{
                //    this.Items[0].Selected = true;
                //    selectedIndex = 0;
                //}
                return selectedIndex;
            }
            set { base.SelectedIndex = value; }
        }

        [ExtenderControlProperty]
        [ClientPropertyName("autoPostBack")]
        public override bool AutoPostBack
        {
            get
            {
                return base.AutoPostBack;
            }
            set
            {
                base.AutoPostBack = value;
            }
        }

        #endregion

        #region TextBox Properties

        public virtual int MaxLength
        {
            get { return TextBoxControl.MaxLength; }
            set { TextBoxControl.MaxLength = value; }
        }

        public override short TabIndex
        {
            get { return TextBoxControl.TabIndex; }
            set { TextBoxControl.TabIndex = value; }
        }

        public override bool Enabled
        {
            get { return base.Enabled; }
            set
            {
                base.Enabled = value;
                TextBoxControl.Enabled = base.Enabled;
                ButtonControl.Enabled = base.Enabled;
            }
        }

        public override Unit Height
        {
            get { return TextBoxControl.Height; }
            set { TextBoxControl.Height = value; }
        }

        public override Unit Width
        {
            get { return TextBoxControl.Width; }
            set { TextBoxControl.Width = value; }
        }

        public override Color ForeColor
        {
            get { return TextBoxControl.ForeColor; }
            set { TextBoxControl.ForeColor = value; }
        }

        public override Color BackColor
        {
            get { return TextBoxControl.BackColor; }
            set { TextBoxControl.BackColor = value; }
        }

        public override FontInfo Font
        {
            get { return TextBoxControl.Font; }
        }

        public override Color BorderColor
        {
            get { return TextBoxControl.BorderColor; }
            set
            {
                TextBoxControl.BorderColor = value;
                ButtonControl.BorderColor = value;
                TextBoxControl.Style.Add("border-right", "0px none");
            }
        }

        public override BorderStyle BorderStyle
        {
            get { return TextBoxControl.BorderStyle; }
            set
            {
                TextBoxControl.BorderStyle = value;
                ButtonControl.BorderStyle = value;
            }
        }

        public override Unit BorderWidth
        {
            get { return TextBoxControl.BorderWidth; }
            set
            {
                TextBoxControl.BorderWidth = value;
                ButtonControl.BorderWidth = value;
            }
        }
        #endregion

        #region Child Controls

        protected virtual TextBox TextBoxControl
        {
            get
            {
                if (_textBoxControl == null)
                {
                    _textBoxControl = new TextBox();
                    _textBoxControl.ID = this.ID + "_TextBox";
                }
                return _textBoxControl;
            }
        }

        protected virtual ComboBoxButton ButtonControl
        {
            get
            {
                if (_buttonControl == null)
                {
                    _buttonControl = new ComboBoxButton();
                    _buttonControl.ID = this.ID + "_Button";
                }
                return _buttonControl;
            }
        }

        protected virtual HiddenField HiddenFieldControl
        {
            get
            {
                if (_hiddenFieldControl == null)
                {
                    _hiddenFieldControl = new HiddenField();
                    _hiddenFieldControl.ID = this.ID + "_HiddenField";
                }
                return _hiddenFieldControl;
            }
        }

        protected virtual System.Web.UI.WebControls.BulletedList OptionListControl
        {
            get
            {
                if (_optionListControl == null)
                {
                    _optionListControl = new System.Web.UI.WebControls.BulletedList();
                    _optionListControl.ID = this.ID + "_OptionList";
                }
                return _optionListControl;
            }
        }

        protected virtual Table ComboTable
        {
            get
            {
                if (_comboTable == null)
                {
                    _comboTable = new Table();
                    _comboTable.ID = this.ID + "_Table";
                    _comboTable.Rows.Add(ComboTableRow);
                }
                return _comboTable;
            }
        }

        protected virtual TableRow ComboTableRow
        {
            get
            {
                if (_comboTableRow == null)
                {
                    _comboTableRow = new TableRow();
                    _comboTableRow.Cells.Add(ComboTableTextBoxCell);
                    _comboTableRow.Cells.Add(ComboTableButtonCell);
                }
                return _comboTableRow;
            }
        }

        protected virtual TableCell ComboTableTextBoxCell
        {
            get
            {
                if (_comboTableTextBoxCell == null)
                {
                    _comboTableTextBoxCell = new TableCell();
                }
                return _comboTableTextBoxCell;
            }
        }

        protected virtual TableCell ComboTableButtonCell
        {
            get
            {
                if (_comboTableButtonCell == null)
                {
                    _comboTableButtonCell = new TableCell();
                }
                return _comboTableButtonCell;
            }
        }

        #endregion

        #region IScriptControl Implementation

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        IEnumerable<ScriptReference> IScriptControl.GetScriptReferences()
        {
            return GetScriptReferences();
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        protected virtual IEnumerable<ScriptReference> GetScriptReferences()
        {
            if (Visible)
            {
                List<ScriptReference> scriptRefs = new List<ScriptReference>();
                scriptRefs.AddRange(ScriptObjectBuilder.GetScriptReferences(GetType(), false));
                return scriptRefs;
            }
            return null;
        }

        //protected virtual IEnumerable<ScriptReference> GetScriptReferences_PreIntegration()
        //{
        //    ArrayList references = new ArrayList();

        //    ScriptReference referenceThis = new ScriptReference();
        //    referenceThis.Assembly = this.GetType().Assembly.FullName;
        //    referenceThis.Name = "ComboBox.ComboBox.js";
        //    //referenceThis.Path = ResolveClientUrl("~/ComboBox/ComboBox.js");
        //    references.Add(referenceThis);

        //    string actAssemblyName = "AjaxControlToolkit";
        //    ToolkitScriptManager tsm = ScriptManager as ToolkitScriptManager;
        //    if (tsm != null)
        //    {
        //        // toolkit scriptmanager may have scriptcombining enabled. 
        //        actAssemblyName = Assembly.GetAssembly(tsm.GetType()).FullName;
        //    }

        //    ScriptReference referenceActBase = new ScriptReference();
        //    referenceActBase.Assembly = actAssemblyName;
        //    referenceActBase.Name = "ExtenderBase.BaseScripts.js";
        //    references.Add(referenceActBase);

        //    ScriptReference referenceActPopup = new ScriptReference();
        //    referenceActPopup.Assembly = actAssemblyName;
        //    referenceActPopup.Name = "PopupExtender.PopupBehavior.js";
        //    references.Add(referenceActPopup);

        //    ScriptReference referenceActCommon = new ScriptReference();
        //    referenceActCommon.Assembly = actAssemblyName;
        //    referenceActCommon.Name = "Common.Common.js";
        //    references.Add(referenceActCommon);

        //    return (ScriptReference[])references.ToArray(typeof(ScriptReference));
        //}

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        IEnumerable<ScriptDescriptor> IScriptControl.GetScriptDescriptors()
        {
            return GetScriptDescriptors();
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors()
        {
            if (Visible)
            {
                List<ScriptDescriptor> descriptors = new List<ScriptDescriptor>();
                ScriptControlDescriptor descriptor = new ScriptControlDescriptor(ClientControlType, ClientID);
                ScriptObjectBuilder.DescribeComponent(this, descriptor, this, this);
                descriptor.AddElementProperty("textBoxControl", TextBoxControl.ClientID);
                descriptor.AddElementProperty("buttonControl", ButtonControl.ClientID);
                descriptor.AddElementProperty("hiddenFieldControl", HiddenFieldControl.ClientID);
                descriptor.AddElementProperty("optionListControl", OptionListControl.ClientID);
                descriptor.AddElementProperty("comboTableControl", ComboTable.ClientID);
                //descriptor.AddProperty("selectedIndex", SelectedIndex);
                descriptor.AddProperty("autoCompleteMode", AutoCompleteMode);
                descriptor.AddProperty("dropDownStyle", DropDownStyle);
                descriptors.Add(descriptor);
                return descriptors;
            }
            return null;
        }

        //protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors_PreIntegration()
        //{
        //    ScriptControlDescriptor descriptor = new ScriptControlDescriptor(
        //        "Sys.Extended.UI.ComboBox", ClientID);

        //    descriptor.AddElementProperty("textBoxControl", TextBoxControl.ClientID);
        //    descriptor.AddElementProperty("buttonControl", ButtonControl.ClientID);
        //    descriptor.AddElementProperty("hiddenFieldControl", HiddenFieldControl.ClientID);
        //    descriptor.AddElementProperty("optionListControl", OptionListControl.ClientID);
        //    descriptor.AddElementProperty("comboTableControl", ComboTable.ClientID);
        //    descriptor.AddProperty("selectedIndex", SelectedIndex);
        //    descriptor.AddProperty("autoPostBack", AutoPostBack);
        //    descriptor.AddProperty("autoCompleteMode", AutoCompleteMode);
        //    descriptor.AddProperty("dropDownStyle", DropDownStyle);
        //    descriptor.AddProperty("caseSensitive", CaseSensitive);
        //    descriptor.AddProperty("listItemHoverCssClass", ListItemHoverCssClass);

        //    return new ScriptDescriptor[] { descriptor };
        //}

        #endregion

        #region IScriptControl Registration

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#")]
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            ScriptObjectBuilder.RegisterCssReferences(this);
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#")]
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            ScriptManager.RegisterScriptControl<ComboBox>(this);
            Page.RegisterRequiresPostBack(this);
        }

        protected override void Render(HtmlTextWriter writer)
        {
            base.Render(writer);
            if (!DesignMode)
                ScriptManager.RegisterScriptDescriptors(this);
        }

        #endregion

        #region Rendering

        protected override void CreateChildControls()
        {
            if (Controls.Count < 1 || Controls[0] != ComboTable)
            {
                Controls.Clear();
                ComboTableTextBoxCell.Controls.Add(TextBoxControl);
                ComboTableButtonCell.Controls.Add(ButtonControl);
                Controls.Add(ComboTable);
                Controls.Add(OptionListControl);
                Controls.Add(HiddenFieldControl);
            }
        }

        protected override HtmlTextWriterTag TagKey
        {
            get { return HtmlTextWriterTag.Div; }
        }

        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            AddContainerAttributesToRender(writer);
            AddTableAttributesToRender(writer);
            AddTextBoxAttributesToRender(writer);
            AddButtonAttributesToRender(writer);
            AddOptionListAttributesToRender(writer);
        }

        protected virtual void AddContainerAttributesToRender(HtmlTextWriter writer)
        {
            if (RenderMode == ComboBoxRenderMode.Inline)
            {
                this.Style.Add(HtmlTextWriterStyle.Display, GetInlineDisplayStyle());
            }
            base.AddAttributesToRender(writer);
        }

        protected virtual void AddTableAttributesToRender(HtmlTextWriter writer)
        {
            ComboTable.CellPadding = 0;
            ComboTable.CellSpacing = 0;
            ComboTable.CssClass = "ajax__combobox_inputcontainer";
            ComboTableTextBoxCell.CssClass = "ajax__combobox_textboxcontainer";
            ComboTableButtonCell.CssClass = "ajax__combobox_buttoncontainer";
            ComboTable.BorderStyle = BorderStyle.None;
            ComboTable.BorderWidth = Unit.Pixel(0);
            if (RenderMode == ComboBoxRenderMode.Inline)
            {
                ComboTable.Style.Add(HtmlTextWriterStyle.Display, GetInlineDisplayStyle());

                if (!DesignMode)
                {
                    // when rendered inline, the combobox displays slightly above adjacent inline elements
                    ComboTable.Style.Add(HtmlTextWriterStyle.Position, "relative");
                    ComboTable.Style.Add(HtmlTextWriterStyle.Top, "5px");
                }
            }
        }

        protected virtual void AddTextBoxAttributesToRender(HtmlTextWriter writer)
        {
            TextBoxControl.AutoCompleteType = AutoCompleteType.None;
            TextBoxControl.Attributes.Add("autocomplete", "off");
        }

        protected virtual void AddButtonAttributesToRender(HtmlTextWriter writer)
        {
            if (!DesignMode)
            {
                //ButtonControl.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
            }
            else
            {
                ButtonControl.Width = Unit.Pixel(14);
                ButtonControl.Height = Unit.Pixel(14);
            }
        }

        protected virtual void AddOptionListAttributesToRender(HtmlTextWriter writer)
        {
            OptionListControl.CssClass = "ajax__combobox_itemlist";
            OptionListControl.Style.Add(HtmlTextWriterStyle.Display, "none");
            OptionListControl.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
        }

        public override void RenderControl(HtmlTextWriter writer)
        {
            if (DesignMode)
            {
                CreateChildControls();
                AddAttributesToRender(writer);
                ComboTable.RenderControl(writer);
            }
            else
            {
                HiddenFieldControl.Value = SelectedIndex.ToString();
                base.RenderControl(writer);
            }
        }

        protected override void RenderContents(HtmlTextWriter writer)
        {
            ComboTable.RenderControl(writer);

            OptionListControl.Items.Clear();
            ListItem[] copy = new ListItem[Items.Count];
            Items.CopyTo(copy, 0);
            OptionListControl.Items.AddRange(copy);
            OptionListControl.RenderControl(writer);

            HiddenFieldControl.RenderControl(writer);
        }

        #endregion

        #region IPostBackDataHandler Implementation

        bool IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)
        {
            return LoadPostData(postDataKey, postCollection);
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
        void IPostBackDataHandler.RaisePostDataChangedEvent()
        {
            RaisePostDataChangedEvent();
        }

        protected virtual bool LoadPostData(string postDataKey, NameValueCollection postCollection)
        {
            if (!Enabled)
                return false;

            int newSelectedIndex = Convert.ToInt32(postCollection.GetValues(HiddenFieldControl.UniqueID)[0], CultureInfo.InvariantCulture);
            EnsureDataBound();

            if (newSelectedIndex == -2 && (DropDownStyle == ComboBoxStyle.Simple || DropDownStyle == ComboBoxStyle.DropDown))
            {
                string newText = postCollection.GetValues(TextBoxControl.UniqueID)[0];
                ComboBoxItemInsertEventArgs eventArgs = new ComboBoxItemInsertEventArgs(newText, ItemInsertLocation);
                this.OnItemInserting(eventArgs);
                if (!eventArgs.Cancel)
                {
                    this.InsertItem(eventArgs);
                }
                else
                {
                    TextBoxControl.Text = (SelectedIndex < 0) ? string.Empty : SelectedItem.Text;
                }
            }

            else if (newSelectedIndex != SelectedIndex)
            {
                SelectedIndex = newSelectedIndex;
                return true;
            }

            return false;
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
        public virtual void RaisePostDataChangedEvent()
        {
            this.OnSelectedIndexChanged(EventArgs.Empty);
        }

        #endregion

        #region ItemInsert Events

        public event EventHandler<ComboBoxItemInsertEventArgs> ItemInserting
        {
            add { Events.AddHandler(EventItemInserting, value); }
            remove { Events.RemoveHandler(EventItemInserting, value); }
        }

        public event EventHandler<ComboBoxItemInsertEventArgs> ItemInserted
        {
            add { Events.AddHandler(EventItemInserted, value); }
            remove { Events.RemoveHandler(EventItemInserted, value); }
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#")]
        protected virtual void OnItemInserting(ComboBoxItemInsertEventArgs e)
        {
            EventHandler<ComboBoxItemInsertEventArgs> handler = (EventHandler<ComboBoxItemInsertEventArgs>)Events[EventItemInserting];
            if (handler != null)
                handler(this, e);
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#")]
        protected virtual void OnItemInserted(ComboBoxItemInsertEventArgs e)
        {
            EventHandler<ComboBoxItemInsertEventArgs> handler = (EventHandler<ComboBoxItemInsertEventArgs>)Events[EventItemInserted];
            if (handler != null)
                handler(this, e);
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#")]
        protected virtual void InsertItem(ComboBoxItemInsertEventArgs e)
        {
            if (!e.Cancel)
            {
                var insertIndex = -1;

                if (e.InsertLocation == ComboBoxItemInsertLocation.Prepend)
                {
                    insertIndex = 0;
                }
                else if (e.InsertLocation == ComboBoxItemInsertLocation.Append)
                {
                    insertIndex = Items.Count;
                }
                else if (e.InsertLocation == ComboBoxItemInsertLocation.OrdinalText)
                {
                    // loop through items collection to find proper insertion point
                    insertIndex = 0;
                    foreach (ListItem li in Items)
                    {
                        int compareValue = string.Compare(e.Item.Text, li.Text, StringComparison.Ordinal);
                        if (compareValue > 0)
                        {
                            ++insertIndex;
                        }
                        else
                        {
                            break;
                        }
                    }
                }
                else if (e.InsertLocation == ComboBoxItemInsertLocation.OrdinalValue)
                {
                    // loop through items collection to find proper insertion point
                    insertIndex = 0;
                    foreach (ListItem li in Items)
                    {
                        int compareValue = string.Compare(e.Item.Value, li.Value, StringComparison.Ordinal);
                        if (compareValue > 0)
                        {
                            ++insertIndex;
                        }
                        else
                        {
                            break;
                        }
                    }
                }

                if (insertIndex >= Items.Count)
                {
                    Items.Add(e.Item);
                    SelectedIndex = Items.Count - 1;
                }
                else
                {
                    Items.Insert(insertIndex, e.Item);
                    SelectedIndex = insertIndex;
                }
                OnItemInserted(e);
            }
        }

        #endregion

        #region Helpers & Subroutines

        private string GetInlineDisplayStyle()
        {
            string display = "inline";
            if (!DesignMode && (Page.Request.Browser.Browser.ToLower().Contains("safari")
                || Page.Request.Browser.Browser.ToLower().Contains("firefox")))
                display += "-block";
            return display;
        }

        #endregion

    }
}


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-12 10:23:31 By : หน้าฮี
 


 

No. 10



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


จาก #NO 9 ทำไมผมถึงต้องปรับปรุง
เหตุผล: Internet Explorer Version 11 มันไม่สนับสนุนคำสั่ง JavaScript selection (มันตัดทิ้งไปเลย)

Code (JavaScript)
document.selection.createRange() 
//และมันใช้ตัวนี้แทน (MS มันหอยจริงฯเลยครับ)
window.getSelection();


ตัวอย่าง http://jsfiddle.net/hgDwx/


ปล. เห็นหรือยังว่าผมไม่ได้เลือกสิ่งที่ดีที่สุด


ประวัติการแก้ไข
2014-09-12 10:34:29
2014-09-12 10:44:56
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-12 10:33:38 By : หน้าฮี
 


 

No. 11



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 8 เขียนโดย : nongpaoza เมื่อวันที่ 2014-09-12 10:22:15
รายละเอียดของการตอบ ::
+55555 คุณจะด่าผมเป็น หมู หมา กา ไก่ หรือตามสะดวก ผมก็ไม่โกรธ เพราะอะไร?
มันไม่มีประโยชน์สำหรับตัวของผมเอง (เห็นหรือยังว่า ผมเป็นคนที่เห็นแก่ตัว)

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-12 10:41:57 By : หน้าฮี
 


 

No. 12



โพสกระทู้ ( 174 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 11 เขียนโดย : หน้าฮี เมื่อวันที่ 2014-09-12 10:41:57
รายละเอียดของการตอบ ::
ะ

คือผมใช้ SUM มันสามารถรวมกันได้ครับ
แต่กลัวถ้า DATA ที่ GROUP มามันเกิน มันก็จะเพิ่มมั่วไปหมดอ่าครับพี่

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-13 12:02:20 By : nongpaoza
 


 

No. 13



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


Code (SQL)
SELECT a.Port_ID, sum(sc1) as p1, sum(sc2) as p2
FROM MT_FLST_QT_QUOTATION a
CROSS APPLY (
	SELECT TOP 1 CASE STATUS
			WHEN 1
				THEN sub_price
			ELSE 0
			END AS sc1, CASE STATUS
			WHEN 2
				THEN sub_price
			ELSE 0
			END AS sc2
	FROM MT_FLST_QT_QUOTATION b
	WHERE b.Port_ID = a.Port_ID AND 1 = 1 AND 'หอย' <> 'เล็ก'
	) ca
GROUP BY a.Port_ID



ปล. สังเกตุดูบรรทัดนี้ SELECT TOP 1 หมายความว่าเอามาแค่ระเบียนเดียวเท่านั้นในแต่ละ Port_ID
ถ้าคุณมีจินตนาการ ก็จะเห็นว่า มันสามารถใส่เงื่อนไขเข้าไปได้ไม่มีขีดจำกัด อทิเช่น หยิบ 2 ในสิบ หรือจากมากไปน้อย และ etc...


ประวัติการแก้ไข
2014-09-13 18:56:12
2014-09-13 19:02:16
2014-09-13 19:03:03
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-13 18:48:43 By : หน้าฮี
 


 

No. 14



โพสกระทู้ ( 296 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook

สงสัยผมอ่านคำถามไม่เคลียร์นึกว่าเอาฟิลด์ สองฟิลด์มารวมกัน เลยให้ใช้ CONCAT - -* ขออภัยด้วยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-13 18:57:52 By : zarooman
 


 

No. 15



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 14 เขียนโดย : zarooman เมื่อวันที่ 2014-09-13 18:57:52
รายละเอียดของการตอบ ::
Code
ของคุณก็ไม่ผิดครับ มันถูกต้องแล้ว เวลาจะใช้งานก็ Split ในโปรแกรม/SQL QuerySplit ซ้ำอีกครั้งหนึ่งก็ได้แล้วครับ (ผมใช้อยู่บ่อยฯครับ แล้วแต่กรณีฯไป)




ประวัติการแก้ไข
2014-09-13 20:00:52
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-13 19:14:55 By : หน้าฮี
 


 

No. 16



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


คนทั่วฯไปมี จินตนาการ รุ่มรวยโอกาส

แต่ผมไม่มีและระบบงานที่คุณกำลังทำอยู่ มันไกล้เคียงกับสิ่งที่ผมฝันเอาไว้ (เพ้อเจ้อ)

x_tmp_axx

ระบบรับงานเช่า/สิ่งที่คุณกำลังทำอยู่มันคือส่วนหนึ่งของระบบ AR ของผม
--- เป็นสินค้าบริการ
---- เกี่ยวข้องกับภาษีขาย (ทดรองภาษี/ผู้ซื้อขอคืนภาษีได้ หลังจากเช็คผ่าน(จ่ายเงินครบแล้ว))
---- เกี่ยวข้องกับ รายได้ เช่น
---- เกี่ยวข้องกับรายจ่าย (บัญชีเงินเดือน เช่น เบี้ยเลี้ยง/โอที ของพนักงานขับ/เด็กท้าย/etc)
---- เกี่ยวข้องกับระบบ Stock (ในที่นี้คือ น้ำมัน/ก๊าด/อุปกรณ์ต่าง) อาจหมายถึง งานซ่อม/โอนย้าย/etc...
---- FIFO/LIFO/Agv...
-------- คำนวณสินค้าแบบ fifo
--------นำมันเข้า 10 ลิตร 30 บาทต่อลิตร
--------เติมไป 8 ลิตร (ไม่มีปัญหา) คงเหลือ 2 ลิตร @30
--------รับใหม่ 10 ลิตร @ 31 บาท
--------เติมใส่ 5 ลิตร มันคำนวณถูกว่า
--------2 ลิตร 30
--------3 ลิตร 31 แสดงรายงานได้ถูกต้องและชัดเจน

-----Actual/Plan


... อีกเยอะเลยครับ ขี้เกียจพิมพ์

แล้วมันจะโยงไประบบบัญชีได้อย่างไร? อทิเช่น
-- รายได้ (ค่าเช่า)
-- รายได้ (ค่าล่วงเวลา/เสียเวลา)
-- รายได้อื่นฯ
-- ส่วนลดจ่าย
-- เงินมัดจำ
-- สำรองภาษีขาย
....
...
...


ประวัติการแก้ไข
2014-09-13 21:19:04
2014-09-13 21:23:07
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-13 21:06:55 By : หน้าฮี
 


 

No. 17



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


จาก #NO 13 บรรทัดที่ 4

คำตอบของคุณ ณ.ตอนนี้คือ (ในอนาคตไม่แน่) แค่เอา TOP ออก
และจำเอาไว้ว่า คำสั่ง SQL Server >= 2008
คำสั่ง CROSS APPLY Microsoft มันทำออกมาเพื่อแก้ไขปัญหานี้โดยเฉพาะ (ประสิทธิภาพสูงมากฯฯฯ)

Code (SQL)
SELECT a.Port_ID, sum(sc1) as p1, sum(sc2) as p2
FROM MT_FLST_QT_QUOTATION a
CROSS APPLY (
	SELECT CASE STATUS
			WHEN 1
				THEN sub_price
			ELSE 0
			END AS sc1, CASE STATUS
			WHEN 2
				THEN sub_price
			ELSE 0
			END AS sc2
	FROM MT_FLST_QT_QUOTATION b
	WHERE b.Port_ID = a.Port_ID AND 1 = 1 AND 'หอย' <> 'เล็ก'
	) ca
GROUP BY a.Port_ID

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-15 11:05:29 By : หน้าฮี
 


 

No. 18



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


จาก #NO 9 คุณดูผม Hacks ขีดจำกัดของแต่ 1 -5 ด้านล่าง
1. BootStrap 3
2. Jquery $.ajax()
3. MS AJAX
4. CSS
5. อื่น


ผมจับ 1-5 มารวมกัน


CSS บรรทัดที่ 1 - 43 แต่ละบรรทัดมีความหมายในตัวเองนะครับ (ไม่ได้มั่ว)
โดยเฉพาะบรรทัดที่ [color=red]2 มีปิดแต่ไม่มีเปิด (ดูผิวเผินผิดแน่นอน +55555)[/color]

Code (XML)
/*Hacks*/
    }
/*Hacks*/
    .WindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_textboxcontainer input
    {
        margin: 0;
        border: solid 1px #7F9DB9;
        /*border-right: 0px none;*/
        padding: 1px 0px 0px 5px;
        font-size: 13px;
        height: 18px;        
    }
    .WindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer button
    {
        margin: 0;
        padding: 0;
        /*background-image: url(../../Images/dd_arrow.gif);*/
        background-position: center center; /*top left;*/
        border: 0px none;
        background-color: transparent;
        height: 24px; /*21px*/
        width: 24px; /*21px*/
        cursor: pointer;
    }
    .WindowsStyle .ajax__combobox_itemlist
    {
        border-color: #7F9DB9;
        background-color: Window;
        color: WindowText;
        position:fixed !important;  
    }
    .WindowsStyle .ajax__combobox_itemlist li
    {
        /*        
        white-space: nowrap;
        padding: 0 3px 0 2px;
        */
        line-height: 38px; /*
        height: 24px !important;
        vertical-align:middle !important;      
        position:relative !important; 
        */
    }




ตัวอย่างที่ใช้งานได้จริงบน IE/FireFox/Chrome/etc... (ผมเสียเวลาไป 2 วันเต็มฯ แต่คุ้มค่าครับ)

x_impossible_a0




ดูดีดีและสังเกตุดีดีนะครับ และอย่าลืมคำว่า "จินตนาการ"


ประวัติการแก้ไข
2014-09-15 11:14:54
2014-09-15 11:18:56
2014-09-15 11:19:36
2014-09-15 11:23:33
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-15 11:11:33 By : หน้าฮี
 


 

No. 19



โพสกระทู้ ( 821 )
บทความ ( 0 )



สถานะออฟไลน์


ของคุณ หน้าฮี

สีสวยดีครับ
ผมชอบสีฟ้า
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-15 11:52:28 By : fonfire
 


 

No. 20



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 19 เขียนโดย : fonfire เมื่อวันที่ 2014-09-15 11:52:28
รายละเอียดของการตอบ ::
เมืองไทย ณ. วันนี้ มีความสุขกันถ้วนหน้า ในยุคที่ "โจรครองเมือง" +55555



ตรรกะการคิดของผมมันผิดเพี้ยนไปแล้วครับ

---- หัวหน้าโจร สอนพวกโจร ให้เป็นคนดีที่สุดใน "ฝูงโจร"
---- โจรสอนคนดี (บังคับ) คนดีให้เป็นโจร และให้เป็นคนดีที่สุดใน "ฝูงโจร"



ปะลาตดีแท้หนอ "เมืองไทย"
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-15 12:24:17 By : หน้าฮี
 


 

No. 21



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


คนตาดำดำ "สะพายย่ามไปหาเห็ดในป่า (ช่วงนี้หน้าฝน เห็ดเยอะ)"

ใครก็ไม่รู้ถามยาย : ได้เห็ดเยอะไหมครับ
ยาย : ร้องไห้ทำตาปริบปริบ (บ่นพรึมพรัมฯฯฯ)
------- ตูยังไม่ได้ก้าวเท้าไปเก็บเห็ดในป่าเลย แม้แต่ก้าวเดียว "ข้อกล่าวหา ยัดเยียด x, y, z, ..., ..., ..." เต็มย่ามเลยว่ะ ไอ้หนูเอ้ย


ปะลาต แท้หนอ "เมืองไทย"


ปล. ตามสะดวก "ยัดเยียดข้อหา"


ประวัติการแก้ไข
2014-09-15 12:35:25
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-15 12:34:16 By : หน้าฮี
 


 

No. 22



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


ฮัดเช่ย์ (จามเบาเบา) ข้อกล่าวหาเต็มย่าม "คนจนจน" เลยว่ะเฮ้ย



ตามสะดวก คนผมหงอกสีขาว มางานศพคน ผมดำ


ประวัติการแก้ไข
2014-09-15 12:40:02
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-15 12:37:38 By : หน้าฮี
 


 

No. 23



โพสกระทู้ ( 611 )
บทความ ( 0 )



สถานะออฟไลน์


ยุคสมัยนี้ ข้อกล่าวหา เต็มย่าม และตามสะดวก +55555
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-09-15 12:43:00 By : หน้าฮี
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : [SQL] รวม Field จาก column ที่สร้างขึ้นเอง ช่วยทีครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 02
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่