RE: [PHP-DB] DB will INSERT wont UPDATE..error in code?

2004-10-12 Thread Graham Cossey
I'm no 'expert' (opening myself up for much criticism here) but try the following: (I'm assuming you are setting $fid somewhere) if (empty($form_status)) { $staff = $_POST[staff]; $ttlpst = $_POST[ttlpst]; $mnthpst = $_POST[mnthpst]; $ttlicon = $_POST[ttlicon]; $mnthicon =

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Graham Cossey
around them. dave Stuart Felenstein [EMAIL PROTECTED] 10/14/2004 08:26 AM To: Graham Cossey [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject: RE: [PHP-DB] mysql error and resource ID: Not much luck here on placing the mysql_error($link

RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-16 Thread Graham Cossey
Have you tried naming your form elements such as skill[], sky[] and slu[] ? (You could also use skill[1], skill[2], skill[3] etc... within your form.) Yes that makes sense. Good. This of course means you can build your form within a for loop (or similar). So to place 10 skill text

RE: [PHP-DB] Dynamic pull down menus with PHP/Mysql

2004-10-05 Thread Graham Cossey
Remember that PHP is server-side, so if you want PHP to do anything you'll have to send a request back to the server (reload the page). To handle things client side will require the likes of javascript, exactly how is beyond me I'm afraid but I'm sure you could do something like load all values

RE: [PHP-DB] accessing two databases within one script

2004-10-05 Thread Graham Cossey
I have several databases running on the same MySQL server and one application needs to run queries over two DBs at the same time. All I do is specify one connect (to the primary DB) and then specify the secondary DB within my queries. This seems to work fine, but not sure if it's discouraged for

RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Graham Cossey
Stuart, what does your echo($query) line output? I would hazard a guess that your quotes are wrong and you are not getting what you expect. What is LUID? I believe you will need to execute an INSERT query within each for($i=0; $icount($l_skill); $i++) loop or increment add $LUID within each

RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Graham Cossey
PROTECTED] Sent: 17 October 2004 16:14 To: Stuart Felenstein; Graham Cossey; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Question: Putting separate form elements into an array Changed my direction somewhat but keep getting a parse error and although I know where it is , I can't seem to figure

RE: [PHP-DB] how many databases should I create

2004-10-18 Thread Graham Cossey
Just to add my 2p/2c.. I use multiple databases as I find this better suits my needs. It is easier to 'plug-in' various components to a client's application if each component is contained in an individual database. For example if your application was to be offered to clients as modules, then

RE: [PHP-DB] Logging Into A MySQL (Web) Database

2004-10-22 Thread Graham Cossey
Probably an off-list posting. That's the problem of just using 'Reply' instead of 'Reply to All' on this list. Other lists I subscribe to always only ever have the list email address when replying, which in my opinion is a better way of doing things. [snip] Ok, who is Alex? If you are

RE: [PHP-DB] Implementing search in a database driven website

2004-10-27 Thread Graham Cossey
I found this PDF 'quick reference' quite useful as I am just starting to learn how to use regular expressions. http://www.erudil.com/pdf/preqr.pdf HTH Graham -Original Message- From: Vinayakam Murugan [mailto:[EMAIL PROTECTED] Sent: 27 October 2004 04:11 To: [EMAIL PROTECTED]

RE: [PHP-DB] error:attempt to write a readonly database

2004-10-28 Thread Graham Cossey
[snip] hi i am getting the following error when i try to run my php program..i want to know wht is this error in general Warning: sqlite_query(): attempt to write a readonly database in /home/saravall/.HTML/inv.php on line 26 error:attempt to write a readonly database [snip] Looks

Re: [PHP-DB] 5 hours later - sql error.

2004-12-03 Thread Graham Cossey
One observation: print_r($query_rsCS); if(!empty($aWHERE)); ^ Remove semi-colon ? $query_rsCS .= ' WHERE '.implode(' AND ',$aWHERE); print_r($aWHERE); HTH Graham -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Pagination

2004-12-16 Thread Graham Cossey
Try heading over to www.phpfreaks.com, they have a couple of tutorials/examples on how to achieve this. HTH Graham. On Thu, 16 Dec 2004 14:38:29 -0800, David Ziggy Lubowa [EMAIL PROTECTED] wrote: Hey guys, I am working on an internal db and i have a script[below] which does some

Re: [PHP-DB] Suggestions please!

2005-11-22 Thread Graham Cossey
On 11/21/05, Micah Stevens [EMAIL PROTECTED] wrote: Sounds like a decision needs to be made. If statements were born for that. On Monday 21 November 2005 3:41 am, JeRRy wrote: Hi, Okay I have a dj site, I have alogin script and cookies to handle the login. Next I want to add some

Re: [PHP-DB] Re: SQL Insert INTO question

2005-12-08 Thread Graham Cossey
snip How about: $review = $_POST['review']; $sql = SELECT * FROM reviews WHERE review_id = '$id'; $res = mysql_query($sql) or die (Query failed: . mysql_error()); if (mysql_num_rows($res) 0) { $sql_upd = UPDATE reviews SET review_text = '$review'

Re: [PHP-DB] Google Style Search Results

2005-12-09 Thread Graham Cossey
On 12/9/05, Julien Bonastre [EMAIL PROTECTED] wrote: snip http://aries.the-spectrum.org/webdev/wawd/forums/search.php?q=sufficient%2Blargest=postsb%5B%5D=*maxres=25ob=datetimeot=DESC snip All I did was conjure up a regular expression that basically just matches words :-) haha ironically..

Re: [PHP-DB] Google Style Search Results

2005-12-09 Thread Graham Cossey
On 12/9/05, Julien Bonastre [EMAIL PROTECTED] wrote: Yay, Questionnaire time I love this part of the game a) I'm not very familiar with regex at all and was wondering if you could tell me how your regex would handle two matched search strings that exist within a few words of each other in

Re: [PHP-DB] Re: RSS/XML

2005-12-18 Thread Graham Cossey
On 12/16/05, El Bekko [EMAIL PROTECTED] wrote: Henry Ortega wrote: I want to put a website's RSS feed on my website. For example, http://beccary.com/feed/ I want to put all the titles of that blog page on my website. Is there an easy way to do this? Because they're all in a DB,

Re: [PHP-DB] date problems

2007-09-07 Thread Graham Cossey
This DID work, but I recently switched hosting companies... Is the new server in a different country with a different date format / time zone? Just a thought ;-\ On 9/7/07, Instruct ICC [EMAIL PROTECTED] wrote: From: Instruct ICC [EMAIL PROTECTED] And while not trusting your indexing,

[PHP-DB] Help with JOIN query

2008-03-06 Thread Graham Cossey
I can't see how to accomplish what I need so if anyone has any suggestions they would be gratefully received... I'm using mysql 4.0.20 by the way. I have two tables : TableA record_id product_ref TableB timestamp record_id action I want to create a SELECT that joins these 2 tables where the

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Graham Cossey
On Thu, Mar 6, 2008 at 6:54 PM, Krister Karlström [EMAIL PROTECTED] wrote: Hi! Graham Cossey wrote: TableA record_id product_ref TableB timestamp record_id action I want to create a SELECT that joins these 2 tables where the JOIN to TableB only returns

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Graham Cossey
On Thu, Mar 6, 2008 at 9:54 PM, J. Hill [EMAIL PROTECTED] wrote: I may be a little confused: the desire is to return all the rows from TableA that match the record_id of a row in TableB that has the MAX timestamp? If so, why not something like: SELECT * FROM TableA a, TableB b WHERE

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Graham Cossey
On Thu, Mar 6, 2008 at 10:59 PM, Gary Wardell [EMAIL PROTECTED] wrote: Ahh, to bad, I started using it with 5.0. I'm also a long time user of SQL Server. Sorry if I caused confusion. Gary You were getting my hopes up there Gary :-( -- Graham -- PHP Database Mailing List

Re: [PHP-DB] Re: Help with JOIN query

2008-03-06 Thread Graham Cossey
On Fri, Mar 7, 2008 at 12:27 AM, Jonathan Crawford [EMAIL PROTECTED] wrote: I think this is what you mean. You just want the timestamp and action from B in addition to something from A (I guessed product_ref), right? The MAX() function should take care of getting the latest timestamp.