#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    12
    Rep Power
    0
    Hi,
    I meet a question.
    When i use PHP script to setup two temporary tables,
    How to use PHP to fetch the table names?

    For example:

    $result1=mysql_query("create temporary table mytable1 select * from train_time where station_name='$station1'",$id_link);
    $result2=mysql_query("create temporary table mytable2 select * from train_time where station_name='$station2'",$id_link);

    But

    mysql_query("select * from mytable1,mytable2 where mytable1.train_number=mytable2.train_number",$id_link);
    No have result!!!

    simple,mysql_query("select * from mytable1",$id_link);
    NO have result.

    So ,how to use the temporary table name by PHP?

    shan baowei
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Newark, DE, USA
    Posts
    39
    Rep Power
    15
    I'm not exactly sure I understand what you're asking, but ...
    try using the mysql_list_tables() function.
    check out the documentation on this function for reference on how to use it.

    ------------------
    ~Chris

Similar Threads

  1. newby split question
    By perleche in forum Perl Programming
    Replies: 4
    Last Post: February 6th, 2004, 09:25 AM
  2. Linux C/C++ winsock & thread question
    By beholder242 in forum C Programming
    Replies: 3
    Last Post: January 28th, 2004, 06:31 AM
  3. PHP data retrieval question with MySQL
    By gursharn in forum PHP Development
    Replies: 7
    Last Post: December 31st, 2003, 09:43 AM
  4. Javascript question mark question?
    By tajmiester in forum JavaScript Development
    Replies: 3
    Last Post: November 30th, 2003, 05:36 PM
  5. Radio Buttons
    By Ulysses Freeman in forum HTML Programming
    Replies: 4
    Last Post: November 15th, 2003, 09:57 PM

IMN logo majestic logo threadwatch logo seochat tools logo