Results 1 to 17 of 17

Thread: MySQL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331

    MySQL

    . MySQL. , , . , "12", , , 12, 1 2. MySQL 12 , , 1,2,12 3.

    .

  2. #2
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    -, . , 1 2 , 12?
    , , , . .
    - , , , :
    1 1
    1 2
    1 12
    2 4
    join , (, , , ). "1" "1" . -, , ( ), . ( , . ) . .
    - , - . , , -, , .

    .. "" "". ' .
    Last edited by Bombera; 11th April 2008 at 00:08.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  3. #3
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    , 1 2 , 12?
    , .

    , 1 -. - . :

    PHP Code:
    $grabProducts = @mysql_query("SELECT DISTINCT p.* FROM Vital_products AS p, Vital_categories AS c, Vital_series AS s WHERE p.Active = '1' AND s.Active = '1' AND p.Cid REGEXP '$catId' AND TitleEn IS NOT NULL AND TextEn IS NOT NULL ORDER BY p.Id DESC LIMIT ".$paging -> _offset.", ".$perpage."") or die(mysql_error()); 
    -> Vital


    Id -
    Bid -
    Sid -
    Cid -
    ...

  4. #4
    Registered User
    Join Date: Jul:2001
    Location: Redmond, USA
    Posts: 1,699
    Quote Originally Posted by z0ne View Post
    ..... , , ....

    http://thedailywtf.com/ ? / - ?
    Soltek 75FRN2-RL bred "B" 1700+ : 1466@2300(11.5x200) 1.85V 512 MB DDR333 TwinMOS: 11-3-3-2@2.8V Leadtek Geforce4Ti 4200 128 MB : 300/600 80GB Seagate 7200.7 CDROM 48x BenQ Enermax EG365P-VE/FCA 350W Creative DT2200 5.1 Middle Tower Water Cooling

  5. #5
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    Quote Originally Posted by Rear Admiral Floyd View Post
    / - ?
    . - . , . , .

  6. #6
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    . , . , REGEXP : (- ), , . - , , , . , , , 9 19, 295 .. , , .

    , , "no, no" , , . (- ) , , . sid e , cid . .

    ?
    Last edited by Bombera; 11th April 2008 at 00:38.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  7. #7
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    . .

    .. . - "-, | " .. .

    :

    PHP Code:
    $catId => (int)$_GET["category"]; 
    PHP Code:
    $product_group = @implode(","$_POST["product_group"]); 
    ( )

    Code:
    <option value="<?php echo $c["Id"];?>"<?php echo ((ereg($c["Id"], $r["Cid"])) ? " selected" : "");?>><?php echo $c["NameBg"]; ?></option>
    ( multiple field)

  8. #8
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    Code:
    ... p.Cid REGEXP '$catId' ...
    Code:
    ... FIND_IN_SET('$catId', p.Cid) > 0 ...
    FIND_IN_SET , :
    Code:
    mysql> SELECT FIND_IN_SET('2', '1,2,3'), FIND_IN_SET('2', '1,22,3')\G
    *************************** 1. row ***************************
     FIND_IN_SET('2', '1,2,3'): 2
    FIND_IN_SET('2', '1,22,3'): 0
    1 row in set (0.00 sec)
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  9. #9
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    :
    (^[0-9]*$)|(,[0-9]*,)|(,[0-9]*$)
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  10. #10
    4.7 V8 Bi-Turbo (M278) -CTPAX-'s Avatar
    Join Date: Jun:2002
    Location:
    Posts: 862
    . , '9' '1,91,5,6,9' - ',9,' ',1,91,5,6,9,'
    i7-3930K@4.7(47x100, 1.41v), EK Supreme HF, Phobya G-Changer 420, XSPC Laing DDC Dual + Pump, Asus Rampage IV Formula, 4x2G RipjawsZ 2133MHz, GTX980Ti EVGA w/ EK-FC Titan, CM ATCS 840, Corsair AX1200, Corsair Force 3 120GB, HP ZR2740w

  11. #11
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    Quote Originally Posted by Bombera View Post
    sid e , cid . .

    ?
    - , .. - .. , .
    PHP Code:
    $grabProducts = @mysql_query("SELECT DISTINCT p.* FROM Vital_products AS p, Vital_categories AS c, Vital_series AS s WHERE p.Active = '1' AND s.Active = '1' AND FIND_IN_SET('$catId', p.Cid) AND TitleEn IS NOT NULL AND TextEn IS NOT NULL ORDER BY p.Id DESC LIMIT ".$paging -> _offset.", ".$perpage."") or die(mysql_error()); 
    , icaci. ! * *

  12. #12
    relative dude Skydive's Avatar
    Join Date: Nov:2002
    Location: /
    Posts: 2,863
    , - :
    ( ) , "12", "1" "2", :
    Code:
    $string = "1,2,12,21,111,222,12121212121212,bla bla bla";
    $regexp = "[12]{2}";
    $string =~ /$regexp/isg;

  13. #13
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    Quote Originally Posted by Skydive View Post
    , - :
    ( ) , "12", "1" "2", :
    Code:
    $string = "1,2,12,21,111,222,12121212121212,bla bla bla";
    $regexp = "[12]{2}";
    $string =~ /$regexp/isg;
    , 12, 1 2. icaci - , , .

  14. #14
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , , .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  15. #15
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    (^[0-9]*$)|(,[0-9]*,)|(,[0-9]*$)
    $catId p.Cid ? .

  16. #16
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    Code:
    '(^'.$catId.'$)|(,'.$catId.',)|(,'.$catId.'$)'
    . ( $ regexp):

    "SELECT DISTINCT p.* FROM Vital_products AS p, Vital_categories AS c, Vital_series AS s WHERE p.Active = '1' AND s.Active = '1' AND p.Cid REGEXP '".'(^'.$catId.'$)|(,'.$catId.',)|(,'.$catI d.'$)'."' AND TitleEn IS NOT NULL AND TextEn IS NOT NULL ORDER BY p.Id DESC LIMIT ".$paging -> _offset.", ".$perpage.""

    $catId, .
    , . .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  17. #17
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    . .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |