1
MySQLデータベース(5.7.17-0ubuntu0.16.04.2)にパスのロードがあり、ユーザーが選択したパスを選択し、それらのパスをすべて選択したい下記のものがありますが、私は問題にぶつかりました。 MySQL REGEXPフィールドのマッチ/エンド
は、ユーザーが望んでいると言う「/ルート/ K」私はのための選択を実行する必要があります。a. /root/K%
b. /root/K
がどのように私はフィールドまたは/の末尾にマッチするREGEXPを得ることができますか?
私は次のことを試してみた:Regex to match _ or end of stringが、それはエラー1139
どれでも他の提案を与える:私も試した
where path REGEXP ('/root/K/|/root/J/J/') # this works but doesn't show the items in that path, only ones below
where path REGEXP '/root/K[/\z]' # does the same as above
where path REGEXP '/root/K(?=/|$)' # Get error 1139, repetition-operator invalid
:
元のクエリ?
完了しました。ありがとうございます。 – trevrobwhite