Re: [PHP-DB] No data being put into the DB

2004-03-04 Thread Bruno Santos
Hello. I'm not sure, but, witch version of php are u using ? replace all the instances of $_POST[varname] with $HTTP_POST_VARS[' varname '] and see what happens !!! Cheers Robert Sossomon wrote: I have a form: http://www.garlandcnorris.com/registration_tradeShow.html That then goes to this pag

[PHP-DB] only showing partial info of a field in mysql...

2004-03-04 Thread Tristan . Pretty
You know in PHPmyADMIN... if you hav a large field, and hit browse, you only see some fo the text... is this a PHP thing, or a MySQL thing... more improtantly, how can I do that?? Cheers, Tris... * The information contained in

Re: [PHP-DB] only showing partial info of a field in mysql...

2004-03-04 Thread Richard Davey
Hello Tristan, Thursday, March 4, 2004, 10:27:34 AM, you wrote: TPrsc> You know in PHPmyADMIN... TPrsc> if you hav a large field, and hit browse, you only see some fo the text... TPrsc> is this a PHP thing, or a MySQL thing... more improtantly, how can I do TPrsc> that?? I don't know how PHPmyAd

RE: [PHP-DB] Two Column Sort

2004-03-04 Thread Ford, Mike [LSS]
On 03 March 2004 17:07, [EMAIL PROTECTED] wrote: > I'm re-raising an issue I never quite resolved which has become more > critical. I want to sort a table on two columns. There are > about 440 > rows of which about 400 are blank in the first sort column (CBC); the > other rows show B in that col

Re: [PHP-DB] Two Column Sort

2004-03-04 Thread Viorel Dragomir
Check for NULL values. - Original Message - From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 12:55 PM Subject: RE: [PHP-DB] Two Column Sort > On 03 March 2004 17:07, [EMAIL PROTECTED] wrote: > > > I'm re-raising an

Re: [PHP-DB] only showing partial info of a field in mysql...

2004-03-04 Thread Tristan . Pretty
Perfect! Cheers...! Richard Davey <[EMAIL PROTECTED]> 04/03/2004 10:50 Please respond to Richard Davey <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Subject Re: [PHP-DB] only showing partial info of a field in mysql... Hello Tristan, Thursday, March 4, 2004, 10:27:34 AM, you wrote:

[PHP-DB] SELECT

2004-03-04 Thread peppe
Hi I have a table users with columns name email and access In email I have values [EMAIL PROTECTED] etc in access I have values 1,2,3,4,7,8 How can I filter value 2 ? Beacause I need only users with value 2 to send email Greetings -- PHP Database Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP-DB] SELECT

2004-03-04 Thread Richard Davey
Hello peppe, Thursday, March 4, 2004, 11:28:30 AM, you wrote: p> Hi I have a table users with columns name email and access p> In email I have values [EMAIL PROTECTED] etc in access I have values 1,2,3,4,7,8 p> How can I filter value 2 ? p> Beacause I need only users with value 2 to send email

Re: [PHP-DB] SELECT

2004-03-04 Thread Ignatius Reilly
SELECT ... FROM users WHERE FIND_IN_SET( 2, values ) > 0 Ignatius _ - Original Message - From: "peppe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 12:28 Subject: [PHP-DB] SELECT > Hi I have a table users with columns name email and

Re: [PHP-DB] SELECT

2004-03-04 Thread peppe
The problem is in access values are like string 1,2,3,4,5 "Richard Davey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello peppe, > > Thursday, March 4, 2004, 11:28:30 AM, you wrote: > > p> Hi I have a table users with columns name email and access > p> In email I have values [E

Re[2]: [PHP-DB] SELECT

2004-03-04 Thread Richard Davey
Hello peppe, Thursday, March 4, 2004, 12:02:40 PM, you wrote: p> The problem is in access values are like string 1,2,3,4,5 Sorry, I didn't realise that. In this case FIND_IN_SET (which I think Ignatius suggested too). -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html

Re: [PHP-DB] SELECT

2004-03-04 Thread peppe
Hi I made this query $sql= "SELECT * FROM users WHERE FIND_IN_SET( 2, access ) > 0 "; $result = mysql_query($sql); $numRows = mysql_num_rows($result); for ($row =1; $row <= $numRows; $row++) { $rowArray = mysql_fetch_array($result); $access1 = $rowArray[1]; if ($acc

Re: [PHP-DB] SELECT

2004-03-04 Thread Ignatius Reilly
?? Didn't you say that $access[1] contains sets such as "1,2,3,4,7,8"? Why compare it to "2"? _ - Original Message - From: "peppe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 13:22 Subject: Re: [PHP-DB] SELECT > Hi > I made this qu

Re: [PHP-DB] SELECT

2004-03-04 Thread peppe
Sorry my foult I don't need to compare you are right Thank you very much "Ignatius Reilly" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > ?? > Didn't you say that $access[1] contains sets such as "1,2,3,4,7,8"? > Why compare it to "2"? > > _ > - Original

Re: [PHP-DB] SELECT

2004-03-04 Thread Torsten Lange
peppe schrieb: for ($row =1; $row <= $numRows; $row++) { $rowArray = mysql_fetch_array($result); $access1 = $rowArray[1]; Hi Peppe, although I don't know the function mysql_fetch_array()... why you use $rowArray[1], which is the first element (if $rowArray is of type array). c

RE: [PHP-DB] No data being put into the DB

2004-03-04 Thread Hutchins, Richard
Yeah, I prefer the ... '".$_POST["varname"]."' ... syntax primarily because of the way my editor (EditPlus) highlights the code. I tried the braces syntax in EditPlus and it doesn't highlight the same way. I'll check out the editors you guys (Jason and Jeffrey) use to see if I like them and maybe I

[PHP-DB] Php datetime

2004-03-04 Thread ..: GamCo :.. Gawie Marais
hi, i have created a mysql table where i would like to store the date and time whenever a user logs into a web site. the login is done through php/mysql as well but i'm not sure what the php code is to add the current date/time into a mysql database. the field in the db is created as a 'datetime'

Re: [PHP-DB] Php datetime

2004-03-04 Thread Ignatius Reilly
You can do it in SQL: INSERT ... SET = NOW() Ignatius _ - Original Message - From: "..: GamCo :.. Gawie Marais" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 14:35 Subject: [PHP-DB] Php datetime > hi, > > i have created a mysql table

[PHP-DB] Multiple deletes and updates...

2004-03-04 Thread Tristan . Pretty
I simply can't get my head round this today Probably easy, but I've been chocka, and brain is melting... Anyhoo... If I have a table, with say, id(unique, auto inc), name, email, membership_type I've listed them on a PHP page... I want to add a checkbox to each row, so that I can select 1 or

RE: [PHP-DB] Php datetime

2004-03-04 Thread Hutchins, Richard
You also have the option of changing the column type to TIMESTAMP. With a TIMESTAMP column you don't have to do anything to get it to update automatically. Just do an INSERT into the table and the column will be updated automatically. Here's a snippet, but check the full MySQL documentation for mo

Re: [PHP-DB] Multiple deletes and updates...

2004-03-04 Thread mustafa ocak
You can use checkboxes to do it : and in the code foreach($_POST["delrec"] as $ccc) { $res=mysql_query("delete from table_name where id= $ccc"); } HTH Mustafa - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 3:36 PM Subject

RE: [PHP-DB] Multiple deletes and updates...

2004-03-04 Thread Hutchins, Richard
Are you thinking about something like (off the top of my head, untested): for each of the people listed on your page? Then, in the script that handles the updating stuff, you simply do a foreach($_POST["update"] as $value){ $sql = "some UPDATE query using $value"; } foreach($_POST["

[PHP-DB] How do you make an IN span multiple tables?

2004-03-04 Thread Richard Davey
Hi, I'm a bit stuck with the following: I need to select data from 3 different tables and want to do it via a SELECT ... IN query. Each table has a primary key called thread_ref. I would like to do something like this: SELECT * FROM table1, table2, table3 WHERE thr

[PHP-DB] working with ' in SQL

2004-03-04 Thread Adam Williams
Hi, I have an SQL statement that is ran when data is submitted through a form. When someone types in a word with an ' such as farmer's the SQL statement fails. I tried $_POST[data] = addslashes($_POST[data]); before executing the SQL statement, but the statement still fails. any suggestions?

RE: [PHP-DB] How do you make an IN span multiple tables?

2004-03-04 Thread Gary Every
Select * from table1 t1, table2 t2, table3 t3 WHERE ((t1.thread_ref IN (1,2,3,4,5,6,7,8,9,10)) or (t2.thread_ref IN (1,2,3,4,5,6,7,8,9,10)) or (t3.thread_ref IN (1,2,3,4,5,6,7,8,9,10))) Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!

Re: [PHP-DB] working with ' in SQL

2004-03-04 Thread Richard Davey
Hello Adam, Thursday, March 4, 2004, 3:30:32 PM, you wrote: AW> Hi, I have an SQL statement that is ran when data is submitted through a AW> form. When someone types in a word with an ' such as farmer's the SQL AW> statement fails. I tried $_POST[data] = AW> addslashes($_POST[data]); before AW

Re: [PHP-DB] Multiple deletes and updates...

2004-03-04 Thread Tristan . Pretty
wow, easy when you know how!!! I've gone back to loads of old sites I've done, and added this... I always freaked out before, but my current boss was stressing... I guess presure works! Cheers Mustafa...! "mustafa ocak" <[EMAIL PROTECTED]> 04/03/2004 13:52 To <[EMAIL PROTECTED]> cc Subject

RE: [PHP-DB] How do you make an IN span multiple tables?

2004-03-04 Thread Swan, Nicole
Have you tried using an 'OR' operator? SELECT * FROM table1, table2, table3 WHERE table1.threadref IN (1,2,3,4,5) OR table2.threadref IN (1,2,3,4,5) OR table3.threadref IN (1,2,3,4,5) --Nicole --- Nicole Swan Web Prog

[PHP-DB] [4.3.3] How to buildi with SQLite support ?

2004-03-04 Thread DAvid Jackson
I looked the the configure --help but didn't see sqlite? Or did I just miss it? How can I build the module for sqlite. David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Two Column Sort

2004-03-04 Thread kc68
On Thu, 4 Mar 2004 10:55:20 -, Ford, Mike [LSS] <[EMAIL PROTECTED]> wrote: On 03 March 2004 17:07, [EMAIL PROTECTED] wrote: I'm re-raising an issue I never quite resolved which has become more critical. I want to sort a table on two columns. There are about 440 rows of which

[PHP-DB] Password encryption

2004-03-04 Thread Mignon Hunter
Can anyone recommend, or does anyone have handy, a script that will encrypt passwords AND then also be able to retrieve the encrypted password. Checking out the docs and some books has confused me mostly. Thx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

[PHP-DB] password encryption

2004-03-04 Thread Mignon Hunter
Can anyone recommend, or does anyone have handy, a script that will = encrypt passwords AND then also be able to retrieve the encrypted = password. I am not able to use mcrypt. Checking out the docs and archives and some books has confused me mostly. Thx -- PHP Database Mailing List (http://www.

Re: [PHP-DB] Password encryption

2004-03-04 Thread Doug Thompson
On Thu, 04 Mar 2004 12:46:51 -0600, Mignon Hunter wrote: >Can anyone recommend, or does anyone have handy, a script that will encrypt passwords >AND then also be able to retrieve the encrypted password. > >Checking out the docs and some books has confused me mostly. > >Thx > Yes and no. $pw =

[PHP-DB] Re: Embedded forms, or multiple postings to an external site....

2004-03-04 Thread Tristan . Pretty
Forget it!!! I had a LIMIT 1 in my code from an earlier test... I AM A MONKEY!! Laters... Man, it just aint my day... I have a page, that lists all entries from my MySQL database. I've used the multiple delete script Mustafa gave me earlier, but one one si

[PHP-DB] Embedded forms, or multiple postings to an external site....

2004-03-04 Thread Tristan . Pretty
Man, it just aint my day... I have a page, that lists all entries from my MySQL database. I've used the multiple delete script Mustafa gave me earlier, but one one site, I think it may not work.. My page is laid out like this: Post other data to other site, in new window Post other dat

Re: [PHP-DB] Password encryption

2004-03-04 Thread Doug Thompson
It is a string function that returns a 32-character md5 hash of "password." MD5 is the name for a current RSA Message Digest Algorithm encryption method. A search in the manual for md5 gets you to the little bit of information in the manual plus a link to RFC 1321 which likely provides more inf

Re: [PHP-DB] Php datetime

2004-03-04 Thread Daniel Clark
I've heard you want to use a TIMESTAMP field for that. > i have created a mysql table where i would like to store the date and time > whenever a user logs into a web site. the login is done through php/mysql > as > well but i'm not sure what the php code is to add the current date/time > into > a

Re: [PHP-DB] Php datetime

2004-03-04 Thread Hans Lellelid
Daniel Clark wrote: > >>i have created a mysql table where i would like to store the date and time >>whenever a user logs into a web site. the login is done through php/mysql >>as >>well but i'm not sure what the php code is to add the current date/time >>into >>a mysql database. the field in the