Re: [PHP-DB] Insert a xml file into a DB

2008-09-23 Thread Matt Anderton
I'm with Yves -- just store the xml files on the local disk and then record their *location* in the DB if you need to reference them. if you really want to store the xml in the db, why not just use a 'text' data type? -- matt On Tue, Sep 23, 2008 at 4:35 PM, YVES SUCAET [EMAIL PROTECTED]

Re: [PHP-DB] mySQL SELECT query

2008-08-29 Thread Matt Anderton
or NOT IN (0,4) -- matt On Fri, Aug 29, 2008 at 12:19 PM, Evert Lammerts [EMAIL PROTECTED]wrote: In the SQL standard this would be AND NOT ministry_directory.listing_approved=0 AND NOT ministry_directory.listing_approved=4 MySQL supports (and there are probably more RDBs that do): AND

Re: [PHP-DB] Submit Button variable passing

2008-05-03 Thread Matt Anderton
pass the value of reference as an argument to your 'deleteCategory()' and 'renameCategory()' functions: script type=text/javascript function deleteCategory(refVal) { ... do something with refVal ... } function renameCategory(refVal) { ... do something with refVal ... } /script $table =

Re: [PHP-DB] Not updating certain fields in same row

2008-03-25 Thread Matt Anderton
I usually pre-populate the form with the values that are already in the record: (... using PEAR's MDB2 package -- http://pear.php.net/packages/MDB2 ) $query = SELECT * FROM member WHERE username = ' . $_POST['username'] . '; $result = $db-query($query); $member =

Re: [PHP-DB] Not updating certain fields in same row

2008-03-25 Thread Matt Anderton
, at 1:17 PM, Matt Anderton wrote: I usually pre-populate the form with the values that are already in the record: (... using PEAR's MDB2 package -- http://pear.php.net/packages/MDB2 ) $query = SELECT * FROM member WHERE username = ' . $_POST['username'] . '; $result = $db-query

Re: [PHP-DB] Multiple values in SELECT query

2008-03-09 Thread Matt Anderton
I like the IN keyword: SELECT * FROM table WHERE name LIKE ABC AND listing_type IN ('1','2'); works kinda like PHP's in_array -- matt On Sun, Mar 9, 2008 at 1:34 PM, Ron Piggott [EMAIL PROTECTED] wrote: What is the correct syntax for where the results may be 1 or 2? What have I done

Re: [PHP-DB] mysql_connect() Help

2008-03-08 Thread Matt Anderton
Manysh -- maybe you missed the MySQL extension installation? 2nd or 3rd screen in the setup process there is a list of extensions -- none of them are installed by default. Your manual method of creating the 'ext' directory is a step in the right direction, but you probably have a missing

Re: [PHP-DB] mysql_connect() Help

2008-03-08 Thread Matt Anderton
); if ($dbselect) echo Connected to the database; else echo Still not connected to the database; mysql_close($link); ? On Sat, Mar 8, 2008 at 7:22 PM, Matt Anderton [EMAIL PROTECTED] wrote: Manysh -- maybe you missed the MySQL extension installation? 2nd or 3rd screen

Re: [PHP-DB] New to PHP/MySQL - Need help with images

2008-01-05 Thread Matt Anderton
how about like this: echo table\ntr; $result = @mysql_query(SELECT image FROM specials); while($row = mysql_fetch_row($result)) { echo tdimg src= . $row[0] . //td\n; } echo /tr\n/table\n; hope it helps! matt On Jan 5, 2008 4:51 PM, Thomas [EMAIL PROTECTED] wrote: I'm attempting to make a

Re: [PHP-DB] Re: [PHP] the opposite of a join?

2007-10-03 Thread Matt Anderton
you could do a RIGHT OUTER JOIN WHERE the company table is on the right to show you the companies that do not exist in the contacts table: SELECT a.name, b.name FROM contacts a RIGHT OUTER JOIN company b ON a.company_id = b.id WHERE a.name IS NULL; results: +--+---+ | name | name

Re: [PHP-DB] php portfolio

2007-04-19 Thread Matt Anderton
the employer to the real deal first, then give him a link to a behind the scenes version? and then what? just throw in pre tags -- this is how I did this part? ~ matt On 4/19/07, bedul [EMAIL PROTECTED] wrote: nope.. nothing dumb on your question. - Original Message - From: Matt

[PHP-DB] php portfolio

2007-04-18 Thread Matt Anderton
I have a kind-of off topic rookie question: most programmers have a web portfolio right? -- a URI to put on their resume that has examples of their work. what do employers expect to see if they ask for such an example? a working web app? links to multiple working web apps? actual code? I

[PHP-DB] populating multi-dimensional array

2007-04-11 Thread Matt Anderton
long-time reader, first-time poster. I am trying to use PEAR's 'hierselect' in HTML_Quickform. I have category and subcategory tables. I want to populate a drop-down based on category, then populate the subcategory based on the user's category selection. mysql desc category;

Re: [PHP-DB] Re: populating multi-dimensional array

2007-04-11 Thread Matt Anderton
thanks for the advice Roberto! the typos in (2) WERE the cause of my problems. I appreciate the comments on my SQL queries and table structures too. sloppy rookie mistakes. ~ matt On 4/11/07, Roberto Mansfield [EMAIL PROTECTED] wrote: Matt Anderton wrote: long-time reader, first-time