RE: [PHP-DB] How to solve T_STRING error?

2002-12-26 Thread Josh Johnson
I'd have to see all of your code, but I'm guessing you've left open a paren or a quotation mark, or a ?php ? block or forgot a semi-colon...probably in a file included before this code is called. Also, you may want to look into how PHP handles null values (I'm pretty sure they evaluate to false,

RE: [PHP-DB] Archiving A Database

2002-11-07 Thread Josh Johnson
definitely keep your suggestions in mind for more serious archiving of data in the future. Thanks again! -- Josh -Original Message- From: Peter Beckman [mailto:beckman;purplecow.com] Sent: Thursday, November 07, 2002 12:05 AM To: Josh Johnson Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB

RE: [PHP-DB] sort by date

2002-11-07 Thread Josh Johnson
It's also a matter of time, I think a lot of people try to be the first to answer something, or are answering from work on a busy day... they just don't have time to write explanations, or to RTFM themselves to verify (I'm guilty of this one), but they want to help. This is especially frustrating

RE: [PHP-DB] Argh!!!! Help with something o-f-f-t-o-p-i-c

2002-11-07 Thread Josh Johnson
Check out www.devguru.com, they have a great javascript refrence Otherwise I have no idea :) -- Josh -Original Message- From: Aaron Wolski [mailto:aaronjw;martekbiz.com] Sent: Thursday, November 07, 2002 4:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Argh Help with something

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
I concur with Jason, but if restructuring is out of the question, just rearrange your queries like this: $query = SELECT Name, Address FROM users; $result = mysql_query($query); while($details = mysql_fetch_array($result)){ echo Name: $details[Name]; echo Address: $details[Address]; }

RE: [PHP-DB] sort by date

2002-11-06 Thread Josh Johnson
I agree, but in regard to your last paragraph, you're assuming that they read your post and respond to it. Everybody's quick to answer simple redundant questions that every programmer *should* know the answer to, but higher level stuff seems to just get ignored. I'd hope in a high-frequency list

RE: [PHP-DB] Question

2002-11-06 Thread Josh Johnson
This isn't the place for discussions of php development, I think php-dev is what you want... but ah, PHP is a full-blown programming language, even under widnows. http://www.php.net/manual/sv/features.commandline.php -- check this page out You can write shell scripts with it, associate windows

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
. Cheers, Graeme :) - Original Message - From: Josh Johnson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 06, 2002 12:29 PM Subject: RE: [PHP-DB] mysql_fetch_array() question I concur with Jason, but if restructuring is out of the question, just rearrange your queries

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
[mailto:holmes072000;charter.net] Sent: Wednesday, November 06, 2002 1:21 PM To: Josh Johnson; 'Graeme McLaren'; [EMAIL PROTECTED] Subject: Re: [PHP-DB] mysql_fetch_array() question That's not true. You can assign them to different variables and it works fine. $r1 = mysql_query(select * from main limit 1

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
Of course, you can avoid that problem if you use a join, I guess it all comes down to code complexity vs SQL complexity. -- Josh -Original Message- From: Ignatius Reilly [mailto:ignatius.reilly;free.fr] Sent: Wednesday, November 06, 2002 1:38 PM To: Josh Johnson; '1LT John W. Holmes

RE: [PHP-DB] Imploding an array?

2002-11-06 Thread Josh Johnson
Does $i have a value? -- Josh -Original Message- From: Rasmus Lerdorf [mailto:rasmus;php.net] Sent: Wednesday, November 06, 2002 2:16 PM To: Aaron Wolski Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Imploding an array? You sure you want [$i] on that? Is it a 2-dimensional array? On

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Josh Johnson
The standard apache install filters anything named .ht*. on the web tree. -- Josh -Original Message- From: Peter Beckman [mailto:beckman;purplecow.com] Sent: Wednesday, November 06, 2002 6:44 PM To: Steve Cayford Cc: [EMAIL PROTECTED]; William Trappeniers Subject: Re: [PHP-DB] MySQL

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Josh Johnson
Also, you can limit access to a specific table in a specific database for a specific user, if it makes sense in your application. -- Josh -Original Message- From: Peter Beckman [mailto:beckman;purplecow.com] Sent: Wednesday, November 06, 2002 6:41 PM To: William Trappeniers Cc: [EMAIL

[PHP-DB] Query Help

2002-11-05 Thread Josh Johnson
I've implemented the scheme I briefly outlined in my last post (locking for data integrity), and now I'm writing queries to get totals from my logs, and I think I might be over-complicating things, and I'd like some alternative views on the subject. My grandiose scheme works like this: Problem:

RE: [PHP-DB] Idea as to why this query won't work as expected?

2002-11-05 Thread Josh Johnson
The or part should be in parens. Your bascialy saying grab everything that has order_status='Shipped' and your date requirements, OR everything where order_status is equal to 'Not Shipped'... -- Josh -Original Message- From: Aaron Wolski [mailto:aaronjw;martekbiz.com] Sent: Tuesday,

[PHP-DB] Locking for data integrity

2002-11-04 Thread Josh Johnson
I'm making a query to one table, and inserting it into another table (INSERT.SELECT syntax). The table that's the source of the copy is updated constantly, and is has a large amount of data in it. Will locking the table for write (or read??) access keep insert queries to the source table from

RE: [PHP-DB] boolean instead of array

2002-11-03 Thread Josh Johnson
It's hard to tell which output is from which loop, you might be getting confused (if anything, you might be confusing anyone that might help)... the Boolean was probabally due to a bad result, for whatever reason (maybe your connect code was wrong? I'm not sure but I think you get a valid

RE: [PHP-DB] COOKIE problem... URGENTLY NEEDED HELP - BEGGING

2002-11-01 Thread Josh Johnson
Are you maybe passing the last parameter in setcookie(), that makes sure that the cookie is only transmitted over a secure connection? Maybe limiting it to a domain, the domain of the secure server instead of the domain of the whole site? http://www.php.net/manual/sk/function.setcookie.php ---

RE: [PHP-DB] killing cookie

2002-11-01 Thread Josh Johnson
I'm pretty sure you just have to set a cookie to an empty string to delete it, i.e., no expiration time -- Josh -Original Message- From: Seabird [mailto:jacco;vliegt.nl] Sent: Friday, November 01, 2002 7:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] killing cookie Hi everyone, I don't

RE: [PHP-DB] Decimal places.

2002-10-30 Thread Josh Johnson
This works too: print (int)(($eall - $sall) / 1000); -- Josh -Original Message- From: Andrew Wilson [mailto:will;netwaynetworks.com.au] Sent: Tuesday, October 29, 2002 11:18 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] Decimal places. Hay guys, I have two variables ( integers ) that

RE: [PHP-DB] Newbie-Question: What's that @?

2002-10-30 Thread Josh Johnson
It suppresses error messages and warnings when you call a function, regardless of your level of error reporting. So yeah, it is like batch programming :) -- Josh -Original Message- From: Marcus Fleige [mailto:marcus.fleige;gmx.de] Sent: Wednesday, October 30, 2002 7:05 PM To:

[PHP-DB] Archiving A Database

2002-10-29 Thread Josh Johnson
Does anyone know of speedy methods of periodically archiving and retrieving a database table? I've got a table I'm using to log statistical data, and it's getting 10k+ entries per day. Entries are only logged in the database if the user is authenticated for access, and only once per access session