Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Mysql select from multiple tables for php.

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 09-07-2009
Member
 
Join Date: Apr 2008
Posts: 242
Mysql select from multiple tables for php.
  

Hi,

I want some help with PHP mySql.
Can you please let me know how to make a query to talk with different tables?
I have some problem with the 2 tables with id name field. How can I give it an auto_increment nature?
please help me with the syntax atleast.

Thanks in advance.

Reply With Quote
  #2  
Old 09-07-2009
Member
 
Join Date: Apr 2008
Posts: 49
Re: Mysql select from multiple tables for php.

SELECT from multiple MySQL Tables

Code:
SELECT fulltxt.pqid AS candidate_ft, citations.chid
FROM citations,fulltxt
WHERE citations.issn = fulltxt.issn
AND citations.volume = fulltxt.volume
AND citations.issue = fulltxt.issue
AND citations.year = fulltxt.year
AND citations.spage = fulltxt.spage
AND citations.pqid = ''
;
Reply With Quote
  #3  
Old 09-07-2009
Member
 
Join Date: Apr 2008
Posts: 25
Re: Mysql select from multiple tables for php.

I have some huge database with around 50 tables & a another table to have the names of all those tables.
I want to know a query that will select from these table & show me a list of results to see at a glance. Ill be able to look as a whole?
Please help me if this can be done?
Reply With Quote
  #4  
Old 09-07-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: Mysql select from multiple tables for php.

hey bayz you need to learn: Database Normalization

Normalization is a part of relational theory, which requires that each relation (AKA table) has a primary key. As a result, this article assumes that all tables have primary keys, without which a table cannot even be considered to be in first normal form.

Database normalization is a process by which an existing schema is modified to bring its component tables into compliance with a series of progressive normal forms.
Reply With Quote
  #5  
Old 09-07-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Mysql select from multiple tables for php.

SELECT Syntax for multiple mysql tables.

Code:
SELECT
    [ALL | DISTINCT | DISTINCTROW ]
      [HIGH_PRIORITY]
      [STRAIGHT_JOIN]
      [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
      [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
    select_expr [, select_expr ...]
    [FROM table_references
    [WHERE where_condition]
    [GROUP BY {col_name | expr | position}
      [ASC | DESC], ... [WITH ROLLUP]]
    [HAVING where_condition]
    [ORDER BY {col_name | expr | position}
      [ASC | DESC], ...]
    [LIMIT {[offset,] row_count | row_count OFFSET offset}]
    [PROCEDURE procedure_name(argument_list)]
    [INTO OUTFILE 'file_name' export_options
      | INTO DUMPFILE 'file_name'
      | INTO var_name [, var_name]]
    [FOR UPDATE | LOCK IN SHARE MODE]]
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Mysql select from multiple tables for php."
Thread Thread Starter Forum Replies Last Post
MySQL: Entering data in tables Botan Software Development 2 22-12-2010 05:44 AM
How to manage databases and tables in MySQL? Aahlaadith Software Development 5 17-12-2010 07:18 AM
How to detect failure of MySQL database tables Agneya Software Development 5 27-02-2010 04:40 AM
How to create MySQL Database and Tables in PHP? Orton Software Development 4 23-02-2010 06:45 AM
How to select multiple table in MySql Doroteo Software Development 4 05-11-2009 09:28 PM


All times are GMT +5.5. The time now is 05:22 AM.