Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Philip Thompson
On Sep 15, 2008, at 2:12 PM, Micah Gersten wrote: You'll actually want to have the User Id in the clocking table, not the other way around. User Id is the foreign key because it has a many to one relationship with the time logging. Thank you, Micah Gersten onShore Networks Internal Developer

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Micah Gersten
You'll actually want to have the User Id in the clocking table, not the other way around. User Id is the foreign key because it has a many to one relationship with the time logging. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Philip Thompson wrote: > > >

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Thodoris
On Sep 15, 2008, at 10:59 AM, Micah Gersten wrote: Use 2 tables. You never know what the app might grow into and you should do it right the first time. That's what I was thinking too... Just wanted to hear it from someone else... NOW I get to learn about foreign keys and how to update thi

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Philip Thompson
On Sep 15, 2008, at 10:03 AM, Jason Pruim wrote: On Sep 15, 2008, at 10:59 AM, Micah Gersten wrote: Use 2 tables. You never know what the app might grow into and you should do it right the first time. That's what I was thinking too... Just wanted to hear it from someone else... NOW I get

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Jason Pruim
On Sep 15, 2008, at 10:59 AM, Micah Gersten wrote: Use 2 tables. You never know what the app might grow into and you should do it right the first time. That's what I was thinking too... Just wanted to hear it from someone else... NOW I get to learn about foreign keys and how to update thin

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Micah Gersten
Use 2 tables. You never know what the app might grow into and you should do it right the first time. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Pruim wrote: > Hi everyone, > > I just wanted to make sure that I am not making something more > compli

Re: [PHP-DB] Question about access rights in php/mysql

2008-08-26 Thread Jason Pruim
On Aug 26, 2008, at 8:32 AM, Dan Shirah wrote: Hi Everyone, I am attempting to wrap my head around an issue and wanted to see if I was thinking right. I am attempting to setup a pURL site, one where they go to something like: example.com/purl.php?purl=jason1234 and the site says "Welcome

Re: [PHP-DB] Question about access rights in php/mysql

2008-08-26 Thread Dan Shirah
> > Hi Everyone, > > I am attempting to wrap my head around an issue and wanted to see if I was > thinking right. > > I am attempting to setup a pURL site, one where they go to something like: > example.com/purl.php?purl=jason1234 and the site says "Welcome Jason". I > have that part of it working,

Re: [PHP-DB] Question on PHP connect MS SQL 2005

2008-06-11 Thread Ken Keefe
I know the package you need is called php-sybase in ubuntu. It's probably something similar in Fedora. Know that this package will only let you do a subset of the mssql function calls. If you are just connecting and doing a normal query, it will suffice. If you need to do prepared statements for st

RE: [PHP-DB] Question on PHP connect MS SQL 2005

2008-06-11 Thread Wei, Alice J.
11, 2008 9:43 AM To: Wei, Alice J. Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Question on PHP connect MS SQL 2005 Alice, In regards to: "Call to undefined function mssql_connect() in /home/TDC/Desktop/create_new_entry_master.php on line 20" Do you have the MSSQL extension uncomme

RE: [PHP-DB] Question on PHP connect MS SQL 2005

2008-06-11 Thread Wei, Alice J.
Hi, This may sound really stupid, but I installed Fedora and checked on the box for web development to allow PHP and other web scripts on the platform. Therefore, I could run PHP scripts fine, and the mentioning of this file, would you be able to offer me suggestions on where it might be? Th

Re: [PHP-DB] Question on PHP connect MS SQL 2005

2008-06-11 Thread Dan Shirah
Alice, In regards to: "Call to undefined function mssql_connect() in /home/TDC/Desktop/create_new_entry_master.php on line 20" Do you have the MSSQL extension uncommented in your PHP.ini? Dan

RE: [PHP-DB] Question about database design

2007-10-24 Thread Bastien Koert
Nope, you got it Bastien > CC: php-db@lists.php.net> From: [EMAIL PROTECTED]> Subject: Re: [PHP-DB] Question about database design> Date: Wed, 24 Oct 2007 15:18:05 -0400> To: [EMAIL PROTECTED]>> I think I understand what you are sayin

Re: [PHP-DB] Question about database design

2007-10-24 Thread Tony Grimes
A second address table is definitely the way to go (the '*' signifies the primary key): People Table *user_id first_name last_name etc Address Table (compound primary key) = *user_id (fk to People Table) *address_id *obs_no (you can skip this if you don't want to keep an

Re: [PHP-DB] Question about database design

2007-10-24 Thread Jason Pruim
I think I understand what you are saying here... On the main table just list the persons name and then on a second table use a 1 to many relationship on a foreign key to link all the addresses into the name? Or did I miss the mark? :) On Oct 24, 2007, at 9:30 AM, Bastien Koert wrote: I wo

Re: [PHP-DB] Question about database design

2007-10-24 Thread Jason Pruim
Hi Tim, Right now the customer I have has about 1,000 records which I know isn't alot for MySQL to handle, but if people like the application we could end up with 15 to 20 all having around 1,000 or more records which would add up more on the database. Although right now I plan to have a

RE: [PHP-DB] Question about database design

2007-10-24 Thread Bastien Koert
I would approach this by having a main people table (with a unique id of course) and then create a second addresses table which uses the people Id key as the foreign key to this table...then you can have multiple (more than two) addresses for those users, you could add a season in the addresses

Re: [PHP-DB] Question about database design

2007-10-24 Thread Tim McGeary
Hi Jason, There are a couple ways you could do this. Yes, this would make it a relational database. If you go with a second table, you'll want to be sure to include the UID from the main address table in the "SnowBirds" table so that they are linked. The UID in the second table would actua

Re: [PHP-DB] Question in js about frameset rows

2006-06-21 Thread suad
Hi, It's working Thanks Suad Bastien Koert wrote: I have fixed values that I adjust to, but you basically need to give the frame an ID and then use .rows and.columns to adjust the size function shrink() { top.document.getElementById("TOP").rows = "65,*,0,46,0"; } function expand() {

RE: [PHP-DB] Question in js about frameset rows

2006-06-21 Thread Bastien Koert
I have fixed values that I adjust to, but you basically need to give the frame an ID and then use .rows and.columns to adjust the size function shrink() { top.document.getElementById("TOP").rows = "65,*,0,46,0"; } function expand() { top.document.getElementById("TOP").rows = "65,*,200,46

Re: [PHP-DB] Question in js about frameset rows

2006-06-21 Thread J R
appologies to the list. i think this should not be asked here. anyway i'll answer. IMHO, there is no easy way to do what you like. what i would suggest is use "document.write()" or inclosing your frameset in a container "" then dynamically change it using "innerHTML" hth On 6/21/06, suad <[EMAI

Re: [PHP-DB] Question about Classes

2006-06-08 Thread Chris
Andrew Darby wrote: Hello, all. I have a sort of theoretical/sort of dumb question about PHP classes, which I haven't really worked with and don't entirely understand the purpose of, so here goes: Say i want to handle the add or update or delete of an item to a MySQL db, and instead of having t

Re: [PHP-DB] Question regarding the scope of pg_prepare

2006-04-14 Thread chris smith
On 4/14/06, Will Chapman <[EMAIL PROTECTED]> wrote: > I have a few different pg_prepare statements in my PHP script. I was > wondering what scope they lie in. Im assuming they are not saved in the > PSQL database, so it is just for the script? They are inside of > functions... does it only last

RE: [PHP-DB] Question on CURDATE()

2005-09-14 Thread reclmaples
.16 Sorry for not including that. Thanks -Rich -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 9:13 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Question on CURDATE() What SQL server are you using? On Tuesday 13 September 2005 7:08 pm

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Micah Stevens
Hi, I just noticed I was wrong, the original SQL statement would return rows, but only if BEGIN = CURDATE(). I stated it would never happen, and that's wrong. Sorry. :) -Micah On Tuesday 13 September 2005 9:42 pm, Micah Stevens wrote: > Hi Jordan, > > Syntactically, there is no restriction

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Micah Stevens
Hi Jordan, Syntactically, there is no restriction on OR'ing or AND'ing conditions. You could very well do this: Select somefield where otherfield = 1 and otherfield = 2; Of course, otherfield would never be both 1 and 2, so this is a worthless select statement, however, my point is, there woul

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Jordan Miller
Micah, Oh, my bad. I was trying to remember how I did something like this before, stringing together a lot of "WHERE"s. You're right, though, it wasn't "WHERE", it was "OR". Rich, I think you need "OR" instead of "AND", OR else I'm just totally out to lunch tonight: SELECT * FROM WEEKS WH

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Micah Stevens
You can't do that in SQL, that would give you a big fat syntax error. On Tuesday 13 September 2005 7:45 pm, Jordan Miller wrote: > Rich, > > Did you try putting "WHERE" twice? > > try: > SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and WHERE END <= CURDATE; > > Jordan > > On Sep 13, 2005, at 9:0

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Jordan Miller
Rich, Did you try putting "WHERE" twice? try: SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and WHERE END <= CURDATE; Jordan On Sep 13, 2005, at 9:08 PM, reclmaples wrote: I am trying to write a statement that will basically do this: SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and END <=

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Micah Stevens
om: Micah Stevens [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 13, 2005 9:13 PM > To: php-db@lists.php.net > Subject: Re: [PHP-DB] Question on CURDATE() > > > > What SQL server are you using? > > On Tuesday 13 September 2005 7:08 pm, reclmaples wrote: > > I am t

RE: [PHP-DB] Question on CURDATE()

2005-09-13 Thread reclmaples
I am using mysql Ver 12.22 Distrib 4.0.16 Sorry for not including that. Thanks -Rich -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 9:13 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Question on CURDATE() What SQL server are you

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Micah Stevens
What SQL server are you using? On Tuesday 13 September 2005 7:08 pm, reclmaples wrote: > I am trying to write a statement that will basically do this: > > SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and END <= CURDATE; > > But for some reason I can only use one CURDATE() reference in my sql > s

RE: [PHP-DB] Question about COUNT(*)

2005-07-07 Thread Erick Wellem
Thanks Rory, This query solves the problem: SELECT client.client_name, IFNULL( COUNT( sales.sale_id ) , 0 ) AS total FROM CLIENT LEFT JOIN sales ON client.client_id = sales.client_id GROUP BY client.client_name ORDER BY total DESC Also thanks to Nandar and Prabhu, but MySQL does not recognize '*

Re: [PHP-DB] Question about COUNT(*)

2005-07-06 Thread Rory McKinley
[EMAIL PROTECTED] wrote: > Hi, > > Let's say that I have 2 tables: client and sales > --- > | client_id | client_name | > --- > | 1 | John| > | 2 | Mark| > | 3 | Luke| > | 4 | Matthew | > --

Re: [PHP-DB] Question about COUNT(*)

2005-07-06 Thread Nandar
try this SELECT client_name, COUNT(sale.client_id) as total FROM client, sale WHERE client.client_id *= sale.client_id GROUP BY client_name ORDER BY total DESC nandar - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, July 06, 2005 1:11 PM Subject: [PHP-DB] Question abo

Re: [PHP-DB] Question regarding how-to stop the form inputting empty data at end of the form that is empty due to a carriage return

2005-01-13 Thread Manjiri Mahajan
Hi Mike, I would suggest that you look for [A-Z],[a-z] and [0-9] characters and build up your string for Media ID instead of replacing "\r" and "\n". I have gone through the same situation for bar code scanning. Regards, Manjiri __ Do you Yaho

Re: [PHP-DB] Question regarding how-to stop the form inputting empty data at end of the form that is empty due to a carriage return

2005-01-11 Thread Rory McKinley
Mike Millner wrote: Hello everyone, I have this form that we use for keeping track of tapes we send off site for storage where I work. The form works almost perfectly with the help of a few people. We use a scanner to input the tape id's. The scanner automatically puts a carriage return at the

RE: [PHP-DB] Question regarding how-to stop the form inputting empty data at end

2005-01-11 Thread Bastien Koert
if the media_ID field is an autonumber, then there is no need to do anything with it...mysql will take the null and generate the next id. bastien From: "Mike Millner" <[EMAIL PROTECTED]> To: Subject: [PHP-DB] Question regarding how-to stop the form inputting empty data at end of the form that i

Re: [PHP-DB] Question regarding how-to stop the form inputting empty data at end of the form that is empty due to a carriage return

2005-01-11 Thread Santa
В сообщении от Среда 12 Январь 2005 04:52 Mike Millner написал(a): > 243 Query INSERT INTO tape_tracking_test > (media_id,retention,out_date,return_date,box_id) values > ('','7WK=%s','2005-01-11','2005-3-01','006455C5092800') > > > How can I get PHP to ignore that line that has empty data in

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > And, by the way, why on earth are you using a > print_r an a straight literal > string? Seems to me you could just put that text in > as part of the HTML: > >if ($row_rsCS == false) { >?> > No Matches > Found > exit; >} >

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:26, Stuart Felenstein wrote: > --- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > > > Well, your taste seems to be to use { }, so :-endif is irrelevant. > > > Al

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:26, Stuart Felenstein wrote: > --- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > > > Well, your taste seems to be to use { }, so :-endif is irrelevant. > > > Al

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > Well, your taste seems to be to use { }, so :-endif > is irrelevant. > Alright it's Friday, I'm punchy but we're all in a good mood ! Yes, I like the closing curlies So, then where do these lovely ladies go here ? if ($row_rsCS == false) { exit;

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:16, Stuart Felenstein wrote: > --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > > > The reason the close is there is because the next > > line > > of code

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:06, Stuart Felenstein wrote: > > The closing ?> of a PHP segment also implies an > > end-of-statement semicolon > > -- so the above is equivalent to: > > > >

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > The reason the close is there is because the next > line > of code is the print_r , and I put some html in > there. > So this works great: if ($row_rsCS == false) { print_r ("No Matches Found"); exit; } But because I want to have some html f

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
> The closing ?> of a PHP segment also implies an > end-of-statement semicolon > -- so the above is equivalent to: > >if ($row_rsCS == false) ; >?> > > Which, of course, means that the scope of the if > doesn't extend to anything > beyond this point. > > You need to mark the block contro

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 14:39, Stuart Felenstein wrote: > I want to send back a message when no matches are > found on my search page. Basically "No matches > found". I assumed that m

Re: [PHP-DB] Question: For no results

2004-12-03 Thread graeme
You might want to use: mysql_num_rows -- Get number of rows in result Stuart Felenstein wrote: I want to send back a message when no matches are found on my search page. Basically "No matches found". I assumed that mysql_fetch_assoc would be the determining factor on whether any rows will com

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Bastien Koert
actually that would reduce it since a fewwer number of rows would potentially match the query...ensure that there is a composite index on a good selection of the columns to mkae the query quicker bastien From: Stuart Felenstein <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: RE: [

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Gryffyn, Trevor
thing under the WHERE clause or max length of SELECT statement. If you find anything interesting, let us know. Sorry couldn't give you a better answer. -TG > -Original Message- > From: Stuart Felenstein [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 01, 2004 10:56

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Stuart Felenstein
--- Bastien Koert <[EMAIL PROTECTED]> wrote: > so...best to build the statement dynamically and > execute it once only if the > input box has a value in it... > And that is the way I'm building it. Just thinking about the scenario that somone actually chooses 75% of the options - would that po

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Bastien Koert
so...best to build the statement dynamically and execute it once only if the input box has a value in it... $sql = "select * from table where 1 "; if (isset($_POST['field1'])){ $sql .= " and column1 = '".$_POST['field1']. "'"; ... if (isset($_POST['fieldN'])){ $sql .= " and columnN = '".$_POST['

Re: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Stuart Felenstein
Sorry ..hit the wrong button --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: I posted this over on mysql list. Not trying to be redundant, but would like to get some feedback. Basically I'm wondering. I am creating a search form , dynamic query, that could potentially have in the area of 4

RE: [PHP-DB] Question

2004-11-09 Thread Norland, Martin
Does your tag have enctype="multipart/form-data" ? e.g. - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -Original Message- From: Jacob Hacka

RE: [PHP-DB] Question: Copy and paste text into mysql text column

2004-10-19 Thread Ed Lazor
> I have a textarea field that will allow users to copy > and paste text into , it might be plain text, or it > might come out of word. > I'm wondering what type of validations I should > perform on this field ? > > Any suggestions / ideas ? Hi Stuart, Check out the strip_tags and mysql_escape_

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

2004-10-17 Thread Stuart Felenstein
> > 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

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

2004-10-17 Thread Graham Cossey
ein [mailto:[EMAIL 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 althoug

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; $i > This is how I am trying to get them into the database: > > $qu

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

2004-10-17 Thread Stuart Felenstein
Changed my direction somewhat but keep getting a parse error and although I know where it is , I can't seem to figure out what I need to do to make it syntax correct: This is how I am passing the arrays: if ( empty( $_SESSION['l_skill'] ) ) { $_SESSION['l_skill']=array(); } if ( is_array( $_REQU

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

2004-10-17 Thread H. J. Wils
Hi everybody, For quite a while i'm struggeled with my session. It doesn't seem to work, can anyone help me? This is my code: page 1: session_start(); $_SESSION["test"] = "tryin..."; if (isset($_SESSION["test"])) { echo "next page"; echo "".session_id(); } page 2: session_start(); if (isset($

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

2004-10-17 Thread Stuart Felenstein
Not exactly sure what I did here. there are 5 skill textfields name skill[] then the years sky[] then the last used slu[] I was following the format of my other arrays, so stored them list this: if ( empty( $_SESSION['l_skill'] ) ) { $_SESSION['l_skill']=array(); } if ( is_array( $_REQUEST['sk

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 skil

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

2004-10-16 Thread Stuart Felenstein
See interspersed: --- Graham Cossey <[EMAIL PROTECTED]> wrote: > 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. > You can just as easily store the arrays in your

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.) This would pass the form values as arrays which you can then iterate through in your script. $skills = $_POST['skill']; $skys = $_POST['sky']; $sl

Re: [PHP-DB] Question on Registration Method

2004-09-28 Thread Stuart Felenstein
Well, finally suceeding to get by activation page working, where the 0 is flipped to 1 to mean actived, I'm stuck on the login page. Unfortunately I'm stuck :) with what I have below. It's part of an authentication system. This code doesn't include the includes, but I thought maybe significant en

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Joseph Crawford
$_GET['activation_hash] is missing the end ' On Mon, 27 Sep 2004 03:20:22 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > On Monday 27 September 2004 03:01, Stuart Felenstein wrote: > > How are they any different? > > > > I'm seeing the same thing as your method. > > These two methods are separat

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Jason Wong
On Monday 27 September 2004 03:01, Stuart Felenstein wrote: > How are they any different? > > I'm seeing the same thing as your method. These two methods are separate: > > - Send user a system generated password with which > > they can login and > > subsequently change. OR > > - Send user an ac

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread M Saleh EG
Stuart... u got the logic now. check ur syntax problems urself... this is the only way ull learn it! a hint... if ur database query is giving u errors... try echoing it before sending it to mysql_query. ull find out the problem yourself then ;) another hint... mysql_query always returns a

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Stuart Felenstein
How are they any different? I'm seeing the same thing as your method. Stuart --- Jason Wong <[EMAIL PROTECTED]> wrote: > On Sunday 26 September 2004 19:45, Stuart Felenstein > wrote: > > > While I'm okay with mine, not completely > satisfied. > > I'd like to change it to the type where like abo

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Stuart Felenstein
Unknown column 'a338265f' in 'where clause' is the latest problem (and should be the last). I had this same error earlier while just doing a straight sql to the database. I corrected it then by putting apostrophes around the column name. That didn't help here , not quotes , maybe double apostrop

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Jason Wong
On Sunday 26 September 2004 19:45, Stuart Felenstein wrote: > While I'm okay with mine, not completely satisfied. > I'd like to change it to the type where like above the > username and password is sent via email, but with the > addition of a link in the email whereby the user must > click on link

RE: [PHP-DB] Question on Registration Method

2004-09-26 Thread Webmaster
> I'm getting an error using the > "mysql_num_rows($result)" > Warning: mysql_num_rows(): supplied argument is not a > valid MySQL result resource in > /home/lurkkcom/public_html/lurktivate.php on line 7 Did you happen to remember to change "fields" in the query string to your table column names,

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Stuart Felenstein
I'm getting an error using the "mysql_num_rows($result)" Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/lurkkcom/public_html/lurktivate.php on line 7 Why am I counting the number of rows in the table? Shouldn't I be looking to see if the code I was pas

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Joseph Crawford
no you dont need a user id or anything, here is some sample code to give you the idea $result = mysql_query("SELECT fields FROM table WHERE code=".$_GET['code']); if(mysql_num_rows($result) > 0) { // we have a match, activate the account $result1 = mysql_query("UPDATE table SET activated=1 WHE

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Stuart Felenstein
Nothing like sharing my pain ;) sorry! It seems that in order to compare the code to the one in the database, don't I need the userid or something? or just that it exists in the database? Thank you, Stuart --- Joseph Crawford <[EMAIL PROTECTED]> wrote: > what i did is i used php to create a rand

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Joseph Crawford
that is done when they click the link in thier email if they are sent to domain.com/page.php?code=X4rfkj490T the code in page.php will $_GET['code'] and compare it to the one in the database, if they match, flip the switch if not show an error. On Sun, 26 Sep 2004 06:35:59 -0700 (PDT), Stuart

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Stuart Felenstein
K...I've added the 2 columns, my names - activate and activate_hash. Upon registration, the activate_hash has a generated string inserted. activate column is default to 0. I can compare it to the database - but not sure how to flip the switch on the activate column 0->1 Is that done through an up

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Joseph Crawford
what i did is i used php to create a random string of numbers and letters about 15 chars long, then i store this in the db, and in the email i make the link page.php?code=RandomStringHere, then on the page.php i get the code and compare it to the ont in the database. If they match activate the use

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Stuart Felenstein
Ok , I think this is along the lines of what I've started. I added a column called "active" with a default to 0. It's a tiny int since I'm think 0=fales, 1=true. So can you explain a tad more about this hash stuff ? Is that specific to a sql field or just a name you've chose ? I'm not sure what

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread Joseph Crawford
currently i do it the same way M Saleh EG does it ;) i have found that is the easiest way and works perfect. > On Sun, 26 Sep 2004 16:34:16 +0400, M Saleh EG <[EMAIL PROTECTED]> wrote: > > I'd do it this way... > > > > I'd add two column in the users table. 1- activated, 2- activation-hash > > >

Re: [PHP-DB] Question on Registration Method

2004-09-26 Thread M Saleh EG
I'd do it this way... I'd add two column in the users table. 1- activated, 2- activation-hash once the registeration form is ubmited.. a-the username and user info will be saved in the users table. b-an encrypted hash would be made n saved in activation-hash column and sent along with the regist

RE: [PHP-DB] Question on Registration Method

2004-09-26 Thread Stuart Felenstein
Currently there are only 2 types of users planned Each has a basic access level. I don't think this is the same as a usergroup though. If I don't have usergroups, but access levels, then perhaps I should set the level to some less then what is required login till activated. Then it sounds like

RE: [PHP-DB] Question on Registration Method

2004-09-26 Thread Oscar Rylin
Usergroups. Most likely, you're dealing with an application where you'll want to have different kinds of users (administrators, power users, users). Just make a usergroup for accounts that haven't been activated yet. Also, a separate table holding information on how to activate (something along th

Re: [PHP-DB] Question about undices for inversed LIKE statesments.

2004-05-31 Thread Daniel Clark
The index should still work normally. >>Hello. >>I have a question about behaviour of indices in queries with inversed LIKE >>in MySQL. I mean something like this: >> >>"select foo from bar where '$some_string' LIKE some_field" >> >>where in the `some_field` I have a strings like 'symbols%' :) >>

Re: [PHP-DB] question on

2004-05-13 Thread Michael Forbes
this information from this point on. Can someone please tell me how I can use the selected item in my next SQL query? -Original Message- From: Tony S. Wu [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 11:07 AM To: hengameh Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] question on s

RE: RE: [PHP-DB] question on

2004-05-13 Thread hengameh
L PROTECTED]> >To: <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> >Date: Wed, 12 May 2004 12:22:20 -0400 >MIME-Version: 1.0 >Content-Type: text/plain; > charset="us-ascii" >Content-Transfer-Encoding: 7bit >Message-ID: <[EMAIL PROTECTED]&

RE: [PHP-DB] question on

2004-05-12 Thread hengameh
ysql_error(); } } ?> -Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 12:41 PM To: hengameh; [EMAIL PROTECTED] Subject: RE: [PHP-DB] question on > Here is the complete code. In the one line Java script that I have I am > setting the

RE: [PHP-DB] question on

2004-05-12 Thread dpgirago
> Here is the complete code. In the one line Java script that I have I am > setting the value. So what am I missing? For the sake of the listers trying to help you, and for your own clarity of concept, I'd suggest starting out by putting all your code into one file. It's quite hard to follow as

RE: [PHP-DB] question on

2004-05-12 Thread hengameh
// select echo mysql_error(); } }else{ //pconnect echo mysql_error(); } ?> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 12:14 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] question on > Thanks

RE: [PHP-DB] question on

2004-05-12 Thread dpgirago
> Thanks so much but I am so new to all this so need more explanation please. > I think at this point I don't mind the round trip to the server side till I > find a better way. But for now I think I have what you are suggesting but > then why my "echo" is not retuning anything : > >

RE: [PHP-DB] question on

2004-05-12 Thread hengameh
tuning anything : (country_build.php creates the select and its options) -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 11:45 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ques

RE: [PHP-DB] question on

2004-05-12 Thread Hutchins, Richard
1:34 AM > To: 'Tony S. Wu' > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] question on > > > Well I am suing Java script to capture the selected item and > make it the > value of my input box. But my problem is how to access this > information from > this

RE: [PHP-DB] question on

2004-05-12 Thread hengameh
:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 11:07 AM To: hengameh Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] question on sounds like a job for JavaScript. Tony S. Wu [EMAIL PROTECTED] "Look into the right places, you can find some good offerings." http://homepage.mac.com/t

Re: [PHP-DB] question on

2004-05-12 Thread Tony S . Wu
sounds like a job for JavaScript. Tony S. Wu [EMAIL PROTECTED] "Look into the right places, you can find some good offerings." http://homepage.mac.com/tonyswu/stw- The perfect business. http://homepage.mac.com/tonyswu/tonyswu- My web page. --

Re: [PHP-DB] Question

2004-02-09 Thread John W. Holmes
From: <[EMAIL PROTECTED]> > Parse error: parse error, unexpected $end in C:\webroot\display.php on line > 131 I'm not going to go through all of your code, but this error means you missed a quote or bracket somewhere, i.e. you didn't supply a closing bracket for an IF() condition. ---John Holm

Re: [PHP-DB] Question

2004-02-09 Thread Fedde van Feggelen
Heyaz, You've got some unclosed statements. Try using tabs for each statement to make it easier on yourself like: if ($iusetabs == true){ echo " like this "; } And in your code.. things go wrong here: == echo ""; echo ""; echo ""; } elseif ($su

RE: [PHP-DB] Question

2004-02-08 Thread Peter Lovatt
Hi I think it may be the { and } which are used in php if they are part of the data you are saving then try adding a \ => \{ and \} if not remove them. Peter --- Excellence in internet and open source software --

Re: [PHP-DB] Question

2004-02-07 Thread Remember14a
Dear friend, I changed $_POST['testField'] instead of $_post[testField] Before it was returning parse error now it doesnt return any error nor writes to mysql database, however I used following sql staatement which wrote to database before // create the SQL statement $sql = "INSERT INTO te

Re: [PHP-DB] Question

2004-02-07 Thread Ignatius Reilly
Quotes: $_POST['testField'] _ - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 07, 2004 20:36 Subject: [PHP-DB] Question > Dear friends, > > On submitting form to mysql database I get a parse error,There is no problem

  1   2   >