Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8034527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:02:44+00:00 2026-06-05T02:02:44+00:00

I’m going crazy… I want to generate an array of tables that will need

  • 0

I’m going crazy…

I want to generate an array of tables that will need to pass through a loop, but I don’t want the table “ClientData” included. Whatever I do, though, it keeps showing up in the array…

I’ve tried this:

SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('QuoteID') AND
COLUMN_NAME NOT REGEXP '\\([^\\)]*ClientData.*\\)'
    AND TABLE_SCHEMA='$db';

I’ve tried this:

SELECT DISTINCT TABLE_NAME 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='$db' OR
`COLUMN_NAME` LIKE 'Training%' OR 
`COLUMN_NAME` LIKE 'Development%' OR  
`COLUMN_NAME` LIKE 'Hardware%' OR 
`COLUMN_NAME` LIKE 'MobilityL%'

In this second case, I have tried to use the LIKE function to pull only the tables I need, but it STILL pulls ClientData. I’ve even added:

`COLUMN_NAME` NOT LIKE 'ClientData'

And every variation of ‘Client%’…

I’m spent. Would appreciate any help anyone has.


vearutop,

You broke the dam for me, thanks! I was caught up in Column_name for some reason and should have been thinking Table_name the whole time. Embarrassing…

I cribbed your Table_name != ‘ClientData’ and replaced the Column_Name filters with Table_name and it’s perfect. Here’s the final:

SELECT DISTINCT TABLE_NAME 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='$db' OR
TABLE_NAME LIKE 'Training%' OR 
TABLE_NAME LIKE 'Development%' OR  
TABLE_NAME LIKE 'Hardware%' OR 
TABLE_NAME LIKE 'MobilityL%'  AND
TABLE_NAME != 'ClientData'

Using just TABLE_NAME != ‘ClientData’ wasn’t a tight enough filter, as I also needed to filter out some other tables, but this is perfect. Thanks again. I’m in my 50th+ hour of consecutive coding to meet a deadline (need to quit volunteering for things!) and this gets me about 2 hours closer to some sleep.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:02:46+00:00Added an answer on June 5, 2026 at 2:02 am
    SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('QuoteID') AND
    TABLE_NAME != 'ClientData'
    AND TABLE_SCHEMA='$db';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I need a function that will clean a strings' special characters. I do NOT
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I want to construct a data frame in an Rcpp function, but when I
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.