Re: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-12 Thread Dobromir Velev
Hi, Did you try to use something like this. mysql_query(SELECT DISTINCT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName,

Re: [PHP-DB] pulling my hair out

2001-07-12 Thread Dobromir Velev
Hi, As I can see you're trying to set a cookie that has expired an hour ago. May be you could try to modify the setcookie() arguments to something like this setcookie (logged_in, yes, time() + 3600); setcookie (logged_user_name, brad, time() + 3600); This will make your cookies to expire after

RE: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-12 Thread Matthew Loff
What about... SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM

Re: [PHP-DB] Paging help needed :-(

2001-07-12 Thread Dobromir Velev
Hi, First you'll have to modify your query to show only ten rows. $sql = SELECT id, email, name, subject, url, image2, comments, dat FROM users ORDER BY id DESC LIMIT $start,10; The $start variable shows the number of the first row to show The links for the previous and next

Re: [PHP-DB] Row order

2001-07-12 Thread Dan Fitzpatrick
Stefan, Depending on your load, you could save the results in a database table, make the table name a session variable, and just have the sorting column names be fields in the saved table. CREATE TABLE Q1234 AS SELECT ...; You can also put all the variables in a variable then put the new

[PHP-DB] Hello

2001-07-12 Thread a
Hello I have an ibm db2 which has jpg images stored as blob fields (about 2M). I seem to have a hard time getting them with PHP and presenting them properly in the browser. (When I try to save it from the DB2 side, it is stored ok). Though i actually get the image i ask for, when i try to

Re: [PHP-DB] Re: Splitting Article Pages

2001-07-12 Thread Sandis Jerics
hello! exactly esterday i had the same problem ;) i did it like this, using wordwrap/explode functions: ... $CFG_max_page_length = 5000; ... if(@mysql_num_rows($rez) 0) { $text = nl2br(mysql_result($rez,0,text)); $text_length = strlen($text); if($text_length

RE: [PHP-DB] Need a shopping cart

2001-07-12 Thread Steve Brett
check out the session cart on phpbuilder.com it stores all the cart stuff as session vars so you can use any db Steve -Original Message- From: Jeff @ HookedOnThe.Net [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 02:47 To: [EMAIL PROTECTED] Subject: [PHP-DB] Need a shopping cart

[PHP-DB] I need a User Authentication solution

2001-07-12 Thread David Coleman
Hello, I'm looking for a complete User Authentication solution. Kind of like the ASP solution listed below: http://www.powerasp.com/content/code-snippets/advanced-password-protection.asp However, I'd like the solution to run on Linux w/ PHP and MySQL. Does anyone know of an off-the-shelf

Re: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-12 Thread Mike Gifford
Hello Dobromir, Dobromir Velev wrote: Did you try to use something like this. mysql_query(SELECT DISTINCT WLPbib.bibID, The only item that I want to have distinct is the first one. However, I think that Matthew's response (to your response) is working now. The other thing that

RE: [PHP-DB] I need a User Authentication solution

2001-07-12 Thread Rubanowicz, Lisa
http://www.phpsecurepages.f2s.com/ I have tried this and it works great. I am very much a beginner so you shouldn't have any problems, just read the README file thoroughly. All the Best Lisa -Original Message- From: David Coleman [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001

Re: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-12 Thread Mike Gifford
Hi Matthew, Matthew Loff wrote: What about... SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization,

RE: [PHP-DB] Hello

2001-07-12 Thread Ben Bleything
Check out http://www.phpbuilder.com/columns/florian19991014.php3. It deals with MySQL, but the concepts should be the same... it sounds like there are some steps about handling the binary data in a binary-safe fashion that are getting left out. Good luck, Ben -Original Message- From: a

[PHP-DB] Order by unix timestamp

2001-07-12 Thread Andreas Iwanowski
Hello, i have a table where unix timestamps are inserted when adding a record. If i read out the table data, i want to order it by unixtime ( the name of the filed where the timestamp is ) He orders it by unixtime, but beginning with the oldest record. i thougt i could fix it by using ORDER by

RE: [PHP-DB] Order by unix timestamp

2001-07-12 Thread Michael Rudel
ORDER BY unixtime DESC (it default orders by asc, not desc) Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16

[PHP-DB] Escaping

2001-07-12 Thread Rankin, Randy
Hello, I have a table in a MySQL DB (RH Linux/Apache) with a field called customer_name. Some of the customer names have an ampersand in them (ie; X X Supply). I am performing a select statement on this table to create a sales summary with customer name and total sales. This works fine;

RE: [PHP-DB] Order by unix timestamp

2001-07-12 Thread Steve Brett
-Original Message- From: Andreas Iwanowski [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 16:09 To: [EMAIL PROTECTED] Subject: [PHP-DB] Order by unix timestamp How can i fix the problem that the records are ordered by unixtime, beginning with the newest record ? order by

Re: [PHP-DB] Order by unix timestamp

2001-07-12 Thread Andreas Iwanowski
Vielen Dank Michael Rudel [EMAIL PROTECTED] schrieb im Newsbeitrag 02bb01c10ae5$38128190$[EMAIL PROTECTED]">news:02bb01c10ae5$38128190$[EMAIL PROTECTED]... ORDER BY unixtime DESC (it default orders by asc, not desc) Greetinx, Mike Michael Rudel - Web-Development, Systemadministration -

Re: [PHP-DB] Order by unix timestamp

2001-07-12 Thread Andreas Iwanowski
Thank you Steve Brett [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -Original Message- From: Andreas Iwanowski [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 16:09 To: [EMAIL PROTECTED] Subject: [PHP-DB] Order by unix timestamp How

Re: [PHP-DB] Escaping

2001-07-12 Thread Roger Ramirez
When they click on the link what is happening? Is it doing a query in the database for all users with that name? If so you may want to do a str_replace('','\','customer_name') before your query. Basically you just want to add the \ before the ampersand. I haven't tried this but it SHOULD

[PHP-DB] How to get a link to next db entry

2001-07-12 Thread Hoth
Hi, I'm programming a forum. Every RE: entry has a parent_id which is id of the parent entry. How could I say this is the Link to the next db_entry? The id of the comments are not in order because not every Person writes a RE: entry - he could start a new thread. Thanks for your help Hoth

[PHP-DB] Clock struggles

2001-07-12 Thread Taylor \Cody\ Fletcher
Im running PHP off of Win2k. The clock on the server is set correctly, but somehow PHP timestamps are adding 7 hours to that. Is there a time zone property that needs to be changed?

Re: [PHP-DB] Hello

2001-07-12 Thread a
The page you gave me didnt help but thanks anyway :) We solved the problem which was dizzing us for days by using the silly command pack(H*, $image) !! Dimitris Ben Bleything [EMAIL PROTECTED] wrote in message

Re: [PHP-DB] Thank you everyone :-)

2001-07-12 Thread Ken Sommers
Here,,Here I second that emotion Ken - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 12, 2001 12:52 PM Subject: [PHP-DB] Thank you everyone :-) Hi there, Thanks everyone for your help on this list - it really is a credit to the PHP community to

RE: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-12 Thread Matthew Loff
Mike-- I hate to suggest quick fixes :) but if all else fails, you can add a DISTINCT to the query. I've had to do it before... If you keep running into problems, and EXPLAIN ... doesn't resolve them, then perhaps you could send us a dump of the db structure... # mysqldump -d

Re: [PHP-DB] Clock struggles

2001-07-12 Thread leo g. divinagracia iii
are you using the GMT time functions or localtime functions? gmmtime, gmdate and gmstrftime are all GMT time, localtime, mktime, strftime use local time... Taylor \Cody\ Fletcher wrote: Im running PHP off of Win2k. The clock on the server is set correctly, but somehow PHP timestamps are

Re: [PHP-DB] Escaping

2001-07-12 Thread leo g. divinagracia iii
try using the SUBSTR function to check each string for the first char as a . if it does have it, strip and continue the process... Rankin, Randy wrote: Hello, I have a table in a MySQL DB (RH Linux/Apache) with a field called customer_name. Some of the customer names have an ampersand in

Re: [PHP-DB] Order by unix timestamp

2001-07-12 Thread leo g. divinagracia iii
try the RSORT (reserve sort) function??? Andreas Iwanowski wrote: Hello, i have a table where unix timestamps are inserted when adding a record. If i read out the table data, i want to order it by unixtime ( the name of the filed where the timestamp is ) He orders it by unixtime, but

RE: [PHP-DB] Production: Linux/Apache/PHP -- FreeTDS -- W2K/MSSQL 7.0

2001-07-12 Thread Mark Roedel
-Original Message- From: E. Peter K. Chan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 11:32 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Production: Linux/Apache/PHP -- FreeTDS -- W2K/MSSQL 7.0 When I switch to production I intend to use: Linux/Apache/PHP --

Re: [PHP-DB] I need a User Authentication solution

2001-07-12 Thread leo g. divinagracia iii
if you are using apache, you try the .htaccess file authorization technique... are you concerned about sending the username and password via plain text through the wire? if yes, then you may have to implement SSL on your server... David Coleman wrote: Hello, I'm looking for a complete

[PHP-DB] Re: Escaping

2001-07-12 Thread Andreas Iwanowski
Do you explode the customer names with X ? Randy Rankin [EMAIL PROTECTED] schrieb im Newsbeitrag F3BF649E168BD411A1B700010271F38BB4BB36@SBMAIL">news:F3BF649E168BD411A1B700010271F38BB4BB36@SBMAIL... Hello, I have a table in a MySQL DB (RH Linux/Apache) with a field called customer_name. Some

[PHP-DB] Random Password Generation/MSSQL

2001-07-12 Thread Ryan Marrs
Having an issue with this script, the generator works if I just echo out the password, however when I attempt to update the table, it times-out in IIS. I've bumped the IIS Timeout up to over 20 minutes, and it still times out. This is on a database with approximately 29,000 entries. Any ideas?

RE: [PHP-DB] Random Password Generation/MSSQL

2001-07-12 Thread Mark Roedel
-Original Message- From: Ryan Marrs [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Random Password Generation/MSSQL Having an issue with this script, the generator works if I just echo out the password, however when I

[PHP-DB] Memory Issues with MySQL 4.0.6

2001-07-12 Thread Chris K. Chew
Hi. PHP crashes every time we run a certain batch of reports since we upgraded from 4.0.4pl1 to 4.0.6. The report is ridiculously complex and requires a boat-load of database queries. They ran very well on the previous versions of PHP. Information: --The script tanks after the 34th query, at

[PHP-DB] Losing session variable with db session handler

2001-07-12 Thread Aral Balkan
Hi all, I tried this question on L-PHP about a week ago and got no replies so I thought I'd give it a shot here: I have a session handler (PHP4) that saves session info to a MySQL database. The problem is that the sessionID changes everytime a new page is loaded. I have cookies on and the

[PHP-DB] data consistency

2001-07-12 Thread andRie Is
Hello php-db, is PHP / Mysql could handle multiple access into table to keep data consistency ? ,,, (@-@) +==---o00(_)00o-==+ It is better to be defeated on principle than to win on lies. --Arthur Calwell -- Best regards,

[PHP-DB] Re: Escaping

2001-07-12 Thread David Bullock
On Thu, 12 Jul 2001 10:18:23 -0500, [EMAIL PROTECTED] (Randy Rankin) wrote: Hello, I have a table in a MySQL DB (RH Linux/Apache) with a field called customer_name. Some of the customer names have an ampersand in them (ie; X X Supply). I am performing a select statement on this table to create

Re: [PHP-DB] Paging help needed :-(

2001-07-12 Thread Roger Ramirez
Here is some code that I like to use. I mix real code and psuedo code cause I'm more used to just using the db class from PHP Lib. First get a count of how many records there are. $sql = SELECT count(*) as c FROM users; Then read that count into variable $count. Declare a variable which will

Re: [PHP-DB] Escaping

2001-07-12 Thread Ken Sommers
Please explain the dynamic link . is that in the documentation somewhere? Kne - Original Message - From: Rankin, Randy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 12, 2001 8:18 AM Subject: [PHP-DB] Escaping Hello, I have a table in a MySQL DB (RH Linux/Apache) with

RE: [PHP-DB] Escaping

2001-07-12 Thread Beau Lebens
dynamic link, i think he means something like echo a href=\customer_details.php?customer=$customer\Customer/a\n; or whatever, and as for making it so that you can include a in the $customer variable in the example above, try this; echo a href=\customer_details.php?customer= .

RE: [PHP-DB] Escaping

2001-07-12 Thread Matthew Loff
I think he just means a hypertext anchor, that contains a string identifying the record. A HREF=fun.php?id=$id -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 11:27 PM To: Rankin, Randy; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Escaping

[PHP-DB] Image Uploading into Database with ID

2001-07-12 Thread Brad R. C.
I don't know how many of you are familiar with Vb (www.vbulletin.com) but I am using the message board software and adding all that I can to it! :) I am wanting my users to be able to add a photo to their profiles. So I am trying to intergrate a upload script, that will upload the address to the

Re: [PHP-DB] Image Uploading into Database with ID

2001-07-12 Thread Jimmy Brake
Hi! so last night I asked is there/how do you do a ocifetchstatement in mysql no one responded.. so this is what I ended up doing. function new_array($array) { // get the keys $array2 = $array; $keys = array_keys($array2); // now use the keys to get