vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Forum and Server Management (https://vborg.vbsupport.ru/forumdisplay.php?f=232)
-   -   Need help with PhpMyAdmin search feature (https://vborg.vbsupport.ru/showthread.php?t=298492)

DF031 05-26-2013 06:20 PM

Need help with PhpMyAdmin search feature
 
Hi All,

I would like to use phpmyadmin to locate some records in the table "post" and column "pagetext".

https://dl.dropboxusercontent.com/u/...min-search.JPG

I want to search for:

-- search starts below--


%%
-- search ends above --

So basically it is two blank lines followed by %%

Now how do I do that, I know how to use the search options, but what do I enter for the blank lines ?

Thanks in advance for your help

kh99 05-26-2013 11:05 PM

Try %\\n\\n\%\%%

DF031 05-27-2013 04:50 AM

Hi KH, thanks for the help.

I got no hits at all.

In order to test I also tried:
Like %...% -->\\n
Like -->\\n

Both no hits (10 000 posts forum). So it looks like the query is incorrect.

kh99 05-27-2013 08:49 AM

Yeah, it doesn't seem to work. \n should match a line break, I think. Playing around with it, it looks like phpMyAdmin adds the extra backslash for you, so it seems like \n\n\%\% should work (the % still need a backslash because it's the wildcard character). But when I tested it, nothing I tried would match the line break. Sorry, hopefully someone else knows.

DF031 05-27-2013 10:20 AM

Thanks KH

Seems \n is not the right approach.

I started to do a simple seach:

https://dl.dropboxusercontent.com/u/...nnnnnnnnnn.PNG

That search finds texts with words like: Ennnnnn

Looks like the query ignores the \ and just tries to find multiple concurrences of n.

Also tried the query \n and compared it to n

Has the exact number of hits (89008)

kh99 05-27-2013 10:52 AM

Hmm...yeah, I guess phpMyAdmin is escaping whatever is in that field, including backslashes, so there's no way to put in special characters (or if there is a way, I can't figure it out).

But maybe try this instead: use the SQL tab and sql like
Code:

SELECT * FROM post WHERE pagetext LIKE '%\n\n\%\%%'

or
Code:

SELECT * FROM post WHERE pagetext LIKE '%\r\n\r\n\%\%%'


All times are GMT. The time now is 03:54 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05157 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete