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 7953445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:09:38+00:00 2026-06-04T03:09:38+00:00

I am building a site and i need to retrieve some information. I have

  • 0

I am building a site and i need to retrieve some information. I have this query.

$SQL = "SELECT distretto_108, provinca_113, regioni_116, tipologia_pdv_106, 
        richiesta_ccnl_107, coop_va_109, nome_pdv_110, 
        indirizzo_pdv_111, localita_112 
        FROM civicrm_value_informazioni_su_tute_le_schede_p_22 ";  

I need to add this other code:

WHERE civicrm_event.title_en_US='".addslashes($_GET["titles"])."' 

but it’s not working…
i need to compare let’s say the id of another table with the id of the current table… How to do that?

Thanks in advance…

  • 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-04T03:09:38+00:00Added an answer on June 4, 2026 at 3:09 am

    You should learn something about joining tables…

    Do not know what the relation is between the two tables (simply said: what column from one table is pointing to what column at other one), but try something similar (modification needed to meet You DB structure) – now lets assume both tables have related column called event_id:

    $SQL = "SELECT distretto_108, provinca_113, regioni_116, tipologia_pdv_106, 
            richiesta_ccnl_107, coop_va_109, nome_pdv_110, 
            indirizzo_pdv_111, localita_112 
        FROM civicrm_value_informazioni_su_tute_le_schede_p_22 cvistlsp22
        LEFT JOIN civicrm_event ce ON ce.event_id = cvistlsp22.event_id
        WHERE ce.title_en_US='".mysql_real_escape_string($_GET["titles"])."'";
    

    civicrm_value_informazioni_su_tute_le_schede_p_22 table name is very long and You will not be able to create a table with such long name in other DBMS (e.g. ORACLE), so try to make it shorter while still self-describing…

    If You want to join tables they have to have a relation, read more about relations and how to use them here: http://net.tutsplus.com/tutorials/databases/sql-for-beginners-part-3-database-relationships/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problems with this site I am building. I need a fixed width
I'm building a site using CodeIgniter. I have lots of experience using SQL with
I'm building a site to display my comics- but I've read some tutorials (
I am building a site for experiment and I am having trouble with some
I am building a site that will (obvisouly) have a front end public portion
We are building a site, and have no interest in creating multiple themes. We
I'm building a site and need to allow users to be able to create
I'm building this site http://www.philgoulet.com/dev/michele/index.php and it looks good in firefox, chrome, IE8, but
I'm building a site where staff will have their own section of the site:
I am building a site off of this framework , and am trying to

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.