RE: [PHP-DB] Question about PHP Arrays syntax

From: Date: Mon, 22 Apr 2002 16:56:54 +0000
Subject: RE: [PHP-DB] Question about PHP Arrays syntax
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18734@lists.php.net to get a copy of this message
> Hello, folks, and I apologize in advance if I break any rules here. This > is my first post on this list and I couldn't find any archive to review > existing posts for the answer to this question. http://www.php.net/mailing-lists.php Thanks for the URL. I feel stupid for having missed it, cause of course that is the page I used to sign up.... Maybe it was the late hour. > a) How would you change the following the automatically find the tables and > run through the iteration. Using mysql running the query: SHOW tables; Would return the names of the tables in the currently selected database. Okay, so I swapped $queryOfTableNames = "SELECT Name FROM $tableNamesTable"; for $queryOfTableNames = "SHOW tables"; Perfect. Worked like a charm. THANKS! >...the RTFM thing, ... I just haven't found the > answer yet. Does that mean you haven't RTFM so you haven't found the answer yet? No. Actually I have been doing a huge bit of reading. To clarify the RTFM thing, I have been absorbing a lot of info, but I just wasn't able to parse all the info well enough yet to recognize the answer when I saw it. > b) When I grab the values of the table names using my prepared table > tableNames, I couldn't figure out how to get the TEXT value of that record. > When I put in a debug statement, all I got was a value of "Array", rather > than a name of a table. It helps to RTFM. In any case the name of the function mysql_fetch_array() kind of gives the game away :) Yeah. I kind of slapped my forehead since I noticed the name AFTER the word "ARRAY appeared in my debug statements. Nice of PHP to output the type of an unsupported object in its functions. $value_of_field_0 = $line[0]; The perfect fit. Thanks. Remember the manual is your friend. If you haven't already done so, download a copy (it's available in various formats) and make use of it! Thanks Jason for your help! _________________________ Vania Smrkovski Internet/Interactivity Consultant 865 450 9952 smrkovski@comcast.net http://mywebpages.comcast.net/smrkovski

« previous php.db (#18734) next »