[PHP-DB] Exporting Data From MySQL Using PHP

2004-08-06 Thread Ron Piggott
I have created a MySQL database. The table I am creating is a subscriptions database. I want to be able to export all e-mail addresses stored in the e_mail column into a plain text file on the web server (1 e-mail address per row) where the discipleship_mailing_list_e_mail_subscription equals

[PHP-DB] Re: Exporting Data From MySQL Using PHP

2004-08-09 Thread Ron Piggott
play ... I didn't get too far in creating code, but I am learning at the same time. Thanks for the advice. Ron - Original Message - From: Guus der Kinderen [EMAIL PROTECTED] Newsgroups: php.db To: Ron Piggott [EMAIL PROTECTED] Sent: Monday, August 09, 2004 7:22 PM Subject: Re: Exporting Data

[PHP-DB] Inserting a ' into mySQL

2004-08-20 Thread Ron Piggott
I have begun to create a Christian Ministry Directory. It is on the ministry web site I am building at http://www.actsministries.org/ministrydirectory/ . One of the problems I am now having is if the user types an ' into their entry --- these ones do not get saved into the mySQL database. The

[PHP-DB] Displaying Text From A Data File

2004-09-04 Thread Ron Piggott
I am still new to PHP and I wanted to ask a question. I am wanting to create a PHP script to randomly display one of many greeting messages on my web site. I was going to store them in a text based file. I wanted PHP to randomly select one of them and display it each time the script was loaded.

[PHP-DB] Re: Displaying Text From A Data File

2004-09-05 Thread Ron Piggott
Thanks for your responses guys. I got it to work. Ron - Original Message - From: Ron Piggott [EMAIL PROTECTED] To: PHP DB [EMAIL PROTECTED] Sent: Saturday, September 04, 2004 2:00 PM Subject: Displaying Text From A Data File I am still new to PHP and I wanted to ask a question. I

[PHP-DB] Building A Web Site Search Engine Using PHP / mySQL

2004-09-07 Thread Ron Piggott
I wanted to also ask about how you would build a web site search engine with php and mySQL. I had thought of setting up a table with a few columns --- one for the URL of the specific page (This could become a link when a match is found for that page) second with the page title --- used in

[PHP-DB] Form Processing

2004-10-15 Thread Ron Piggott
I would like to know if you are able to create a PHP web form that has different SUBMIT buttons --- or if you used the HTML command SELECT NAME=approval_command OPTIONDelete Record OPTIONUpdate And Approve For Listing OPTIONFor Management /SELECT Basically I want the delete record to find the

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

2004-10-21 Thread Ron Piggott
Any ideas on how to log into a mySQL database through a web form and creating user sessions? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2004-10-21 Thread Ron Piggott
Hi Robby I knew clearly what I was trying to say in my mind but didn't do a good job expressing it. The web site address Alex sent me is what I am looking at creating. Ron - Original Message - From: Robby Russell [EMAIL PROTECTED] To: Ron Piggott [EMAIL PROTECTED] Cc: PHP DB [EMAIL

[PHP-DB] Frames mySQL

2004-11-18 Thread Ron Piggott
I have another challenge I am trying to over come. Frames. I have my screen set up in 3 frames. 2 for user input and the third is for data --- letting the user know what has just happened. IE RECORD UPDATED is what I want to be displayed there. The catch is this --- how do I display text in

[PHP-DB] auto_increment

2004-12-26 Thread Ron Piggott
I have the auto_increment on one of my variables. During the past few days I have been doing testing on a live database and created several test records which I now have deleted from my table. Is there any way of setting the auto_increment value to match the last correct number? Ron -- PHP

Re: [PHP-DB] Math and mySQL

2004-12-31 Thread Ron Piggott
intersperesed comments bastien From: Ron Piggott [EMAIL PROTECTED] To: PHP DB php-db@lists.php.net Subject: [PHP-DB] Math and mySQL Date: Thu, 30 Dec 2004 05:51:44 -0500 Is there any way of retreiving the last record of a mySQL table where I may specify one of the values in it? I know the SELECT

[PHP-DB] PHP form processing

2005-02-28 Thread Ron Piggott
Is there a way to find out the IP address of the computer submitting a form --- other than through a cookie. Is there a header command or something like this? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] onClick

2005-02-28 Thread Ron Piggott
Another question: Is there a way that I may set up an IF command with the onClick function so that my_web_page.php3 will not be displayed unless a web form was used to generate it? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Referring web page

2005-02-28 Thread Ron Piggott
I want to change my question --- Is there a way to check the referring web page --- IE where the link came from and what would that variable name be? I mean this in the same fashion that $_SERVER['REMOTE_ADDR'] gives you the IP address of the user. Ron -- PHP Database Mailing List

[PHP-DB] Expiry Date ($date function)

2005-03-02 Thread Ron Piggott
I figured out that the syntax below creates the date in the way it may be stored in a mySQL table: $todays_date=DATE('Y-m-d'); Is there any way to add 21 days to this as an expiry date? For example if the date was March 20th 2005 21 days would be in April --- is there any way of dealing with

Re: [PHP-DB] Expiry Date ($date function)

2005-03-02 Thread Ron Piggott
- Original Message - From: Calvin Lough [EMAIL PROTECTED] To: Ron Piggott [EMAIL PROTECTED]; PHP DB php-db@lists.php.net Sent: Wednesday, March 02, 2005 10:50 AM Subject: Re: [PHP-DB] Expiry Date ($date function) The strtotime function should work the best. $add_twentyone = strtotime(+21 days); I

[PHP-DB] Random Character String

2005-03-05 Thread Ron Piggott
Is there a way of generating an 8 character random string in PHP? Is there a way to ignore UPPER and lower case when you are using the SELECT command to find a record in the mySQL table? I know this isn't an HTML forum ... I have one more question which is more HTML in nature. I don't want some

Re: [PHP-DB] Random Character String

2005-03-05 Thread Ron Piggott
The robots that index the web. Bastien gave me a web site to use for this. Thanks. Ron - Original Message - From: Zareef Ahmed [EMAIL PROTECTED] To: Ron Piggott [EMAIL PROTECTED] Cc: PHP DB php-db@lists.php.net Sent: Saturday, March 05, 2005 11:56 AM Subject: Re: [PHP-DB] Random

[PHP-DB] mysql_real_escape_string for HTML p???

2005-03-05 Thread Ron Piggott
I know of the $variable = mysql_real_escape_string($variable); It works just nicely to allow some of the wild cards to be saved to a mySQL table. Is there something like this for HTML that when you retrieve from a variable in the table an ENTER would be converted to P I am mainly talking about

[PHP-DB] Command Line Error

2005-03-28 Thread Ron Piggott
I wrote a really simple 11 or 12 line PHP script to remove old entries from a web card application I made: ? $todays_date=DATE(Y-m-d); $username=user; $password=password; $database=database; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( Unable to select

Re: [PHP-DB] Command Line Error

2005-03-28 Thread Ron Piggott
PROTECTED] To: Ron Piggott [EMAIL PROTECTED] Sent: Monday, March 28, 2005 11:02 AM Subject: Re: [PHP-DB] Command Line Error are you putting: #!/path to php cli binary at the top of your page? if not, it will be interpreted as a shell (bash/csh) script. -- Original Message

[PHP-DB] File retrieval

2005-04-02 Thread Ron Piggott
If I have a file named data.txt Is it possible to load the contents of it into a variable search as $contents idealy I would like to know if I am able to do something like $contents = data.txt; Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] That crazy IF command!

2005-04-03 Thread Ron Piggott
Hey guys ... I am wondering if you have a varable named $query_holder=the big fat cow made lots of milk today; are you able to use the if command to see if the words big fat are part of that phrase? What would the syntax be? Ron -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] That crazy IF command!

2005-04-03 Thread Ron Piggott
Many thanks! Ron - Original Message - From: Justin Gruenberg [EMAIL PROTECTED] To: Ron Piggott [EMAIL PROTECTED]; php-db@lists.php.net Sent: Sunday, April 03, 2005 3:05 PM Subject: Re: [PHP-DB] That crazy IF command! On Apr 2, 2005 3:52 PM, Ron Piggott [EMAIL PROTECTED] wrote: Hey

[PHP-DB] 'OR' logic in mySQL query

2005-04-17 Thread Ron Piggott
Am I able to use the OR logic in mySQL queries? $query = SELECT * FROM table WHERE date_received LIKE '$todays_date' OR '$yesterdays_date' ORDER BY prayer_request_reference ASC; In this above example will the OR '$yesterdays_date' work? In reality I am wanting to preview new entries to the

[PHP-DB] Database creation question

2005-04-28 Thread Ron Piggott
I have a question. I am wondering if any one out there has ever made a database which maybe have fields dividied by # or /// --- something that doesn't use mySQL, tables or columns? OR another question is would it be possible to install mySQL into my web site hosting package so I may use some of

[PHP-DB] PHP Mail command

2005-06-05 Thread Ron Piggott
I have a mail() question. Take a look at this sample code below: Pay attention the $message variable ? $to=[EMAIL PROTECTED]; $subject=Test e-mail; $headers = From: [EMAIL PROTECTED]; $message = But prove yourselves doesn't and not only hears. ; mail($to, $subject, $message, $headers); ?

Re: [PHP-DB] PHP Mail command

2005-06-05 Thread Ron Piggott
- Original Message - From: Joseph Crawford To: Ron Piggott ; [PHP-DB] Mailing List Sent: Sunday, June 05, 2005 9:50 PM Subject: Re: [PHP-DB] PHP Mail command try addslashes maybe ;) On 6/5/05, Ron Piggott [EMAIL PROTECTED] wrote: I have a mail() question. Take a look

[PHP-DB] escape

2005-06-06 Thread Ron Piggott
When you retrieve a cell from the table it is escaped. $quotation=mysql_result($result,$i,quotation); Are you then able to use the UPDATE command to mark that $quotation as the one currently in use if I had a today column? Would the escape part of it cause the search to fail? The $quotation

[PHP-DB] mySQL UPDATE

2005-06-09 Thread Ron Piggott
I created a PHP based mailing list that sends out a Bible verse and a quotation each day. Today's verses were: Bible verse of the day: Matthew 17:19-21 Then the disciples came to Jesus privately and said, Why could we not cast it out? And He said to them, Because of the littleness of your

[PHP-DB] General UPDATE question

2005-06-16 Thread Ron Piggott
Does the UPDATE command only change one row or each occurance if the the criteria repeat itself through the table? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: UPDATE command

2005-06-17 Thread Ron Piggott
This is kind of interesting ... $query=SELECT * FROM quiettimequotation WHERE used = 0 ORDER BY RAND() LIMIT 1; works; $query=SELECT * FROM bibleverses WHERE 'used' = 0 ORDER BY RAND() LIMIT 1; doesn't! Having the ' around used makes that select command fail --- but the UPDATE command

[PHP-DB] IF command

2005-07-02 Thread Ron Piggott
I am trying to run the following if statement --- I need the integer value of $delete to be read by PHP --- what did I do wrong? I only want the commands that follow to be used if delete is more than 0 Ron if ( $delete 0 ) { -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

[PHP-DB] Re: IF command

2005-07-02 Thread Ron Piggott
Sorry. This syntax works. I had used the wrong variable within my IF command that caused this not to work :) - Original Message - From: Ron Piggott [EMAIL PROTECTED] To: PHP DB php-db@lists.php.net Sent: Saturday, July 02, 2005 11:05 AM Subject: IF command I am trying to run

[PHP-DB] Current web page being displayed

2005-08-06 Thread Ron Piggott
What is the correct $_SERVER that tells me what page is currently being displayed? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Search engine results

2005-08-13 Thread Ron Piggott
I have wrote a basic search engine PHP script. I have created a mySQL database of the files which are allowed to be searched (Example: directory/file_name.html) When someone enters search criteria the mySQL database is opened and the various web site files are loaded one at a time, dumped into a

[PHP-DB] DATE(r)

2005-09-09 Thread Ron Piggott
Question: I am trying to for the first time create a table with a column that is defined as datetime I wanted to populate that column with the date(r) command. date(r) on my web site gives this response: Fri, 9 Sep 2005 13:32:19 -0400 How may I manipulate date(r) to give a format which is

[PHP-DB] Inserting same text into HTML files

2005-09-11 Thread Ron Piggott
Do any of you know of software that is able to open up my web site HTML files (text based) and insert text as the first few rows of each file? This isn't a search replace operation. Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] One additional thought

2005-09-11 Thread Ron Piggott
I have this PHP code below that loads a web page into the $message variable $lineArray = file($web_page); // make an empty variable first $message = ; // concat all array element foreach($lineArray as $eachLine) { $message .= $eachLine; } $additional_text = blah blah blah; $message =

[PHP-DB] Password field in a web form

2005-09-17 Thread Ron Piggott
How do you make *'s come up on the screen in a password field instead of what the user is actually typing in? input type=text name=pass size=8 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] If syntax

2005-10-01 Thread Ron Piggott
Take a look at my if ( ) syntax line below. I am wondering if I have it wrong in same way. What I am trying to achieve is if the alias the user enters is already found in the database I want the words Alias already in use to be shown on the screen; otherwise Unique alias to be shown on the

[PHP-DB] is SELECT case sensitive

2005-10-06 Thread Ron Piggott
Is SELECT typically case sensitive? Is there a way to make it case sensitive? (In the example below can $searching_criteria become case sensitive?) SELECT * FROM table_name WHERE column LIKE '$searching_criteria'; Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Search Replace within PHP

2005-10-06 Thread Ron Piggott
Is there a search replace PHP command? An example I am needing this for would be: My name is replace_with_real_name I want to retrieve replace_with_real_name from a mySQL database and put in the name ... the key is that I want to put the person's name in various position ... so I want to

[PHP-DB] Converting the Month from a word into the numerical expression

2005-10-06 Thread Ron Piggott
I have the word for the month stored in the variable $month In this example $month may be equal to June. I wonder if there is a way to use the DATE function to convert this into a numberical expression --- in this example 06 Ron -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] My $_SESSION['''] variables are expiring!

2005-10-28 Thread Ron Piggott
My $_SESSION['variable'] 's are expiring. How do I find what my web site hosting company has their length set to so I may have them adjusted? They just expired while I was actively using the associated scripts. Once the web site hosting computer lost track of the user session number generated

Re: [PHP-DB] My $_SESSION['''] variables are expiring!

2005-10-29 Thread Ron Piggott
to see if this is the problem. (firefox has no problem) On 10/28/05, Ron Piggott [EMAIL PROTECTED] wrote: My $_SESSION['variable'] 's are expiring. How do I find what my web site hosting company has their length set to so I may have them adjusted

[PHP-DB] Re: My $_SESSION['''] variables are expiring!

2005-10-29 Thread Ron Piggott
the session id in the URL 2. place the session id in a hidden field 3. try placing it in a regular cookie. You may want to check your browser setting to ensure that the browser accepts cookies from your site Bastien On Fri, 2005-28-10 at 20:59 -0400, Ron Piggott wrote: My $_SESSION['variable

RE: [PHP-DB] Re: My $_SESSION['''] variables are expiring!

2005-10-29 Thread Ron Piggott
wrote: Just a thought, maybe when you are checking for the session object that the ! (not) operator is missed if (isset($_SESSION) { $_SESSION['some_var'] = 0; } where it should be if (!isset($_SESSION) { $_SESSION['some_var'] = 0; } B From: Ron Piggott [EMAIL PROTECTED] Reply

Re: [PHP-DB] Re: My $_SESSION['''] variables are expiring!

2005-10-29 Thread Ron Piggott
session_regenerate_id works. Ron On Sat, 2005-29-10 at 16:23 -0500, Jackson wrote: To my knowledge, transfering the contents of the registered variables to an unregistered variable and then unregistering the registered variable and re-registering it would work, but seems a little painstaking.

[PHP-DB] ini_set / $_SESSION[''] file directory

2005-10-30 Thread Ron Piggott
Is there a way that I may specify the directory (perhaps with the ini_set command) where the $_SESSION[''] files are stored on the server? For example I want to place them in /home/my_directory is session.cookie_path the variable this directory is specified in? (I read that you need to

[PHP-DB] Re: Would you look at some code?

2005-11-13 Thread Ron Piggott
Thanks. I didn't understand what this error message was saying to me. Ron On Sun, 2005-13-11 at 18:20 -0500, Ron Piggott wrote: I am getting the parse error message Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' line 121 -- PHP Database Mailing List (http

[PHP-DB] Amount of characters a variable is able to contain

2005-11-16 Thread Ron Piggott
This is a sample of code which takes the $web_page and puts it into $message The problem I have is that I have lines in my $web_page files which are longer (have more characters) than $message is able to handle and chunks of web page text are simply truncated after the character limit has been

[PHP-DB] variable contents manipulation

2005-11-17 Thread Ron Piggott
If I have the contents of a file is $file_contents and I want to remove the text that starts off form up to/form is there a way to do this? I have an e-mail to web gateway set up and I would like to know if I am able to remove the E-mail this web page form when the file is indeed

[PHP-DB] file_get_contents

2005-11-19 Thread Ron Piggott
I have given the command file_get_contents($web_page_address); (I changed this from an array last week) But after 1015 characters of typing file_get_contents is truncating the text. I am wondering if there is a PHP setting which is causing this to happen. But I don't know which PHP setting to

[PHP-DB] file_get_contents

2005-11-20 Thread Ron Piggott
Ok. Here is some code: $message = file_get_contents($web_page_address); #in this situation $web_page_address is equal to http://www.actsministrieschristianevangelism.org/christianliving/how_do_I_respond_to_people_at_my_church_doing_their_hour_of_religion.html

Re: [PHP-DB] file_get_contents

2005-11-20 Thread Ron Piggott
This just got interesting. It does this error just through e-mail. If I run an 'echo $message;' the entire file which has been loaded displays correctly. My mail syntax is mail($to,$subject,$message,$headers) where $message is the HTML file text I am attempting to e-mail. file_get_contents

[PHP-DB] Re: Search engine

2006-09-28 Thread Ron Piggott
Part of why I want to do this is for the programming experience. This is why I didn't implement the google solution already. Ron On Wed, 2006-09-27 at 22:44 -0400, Ron Piggott (PHP) wrote: Has anyone wrote a search engine for the web site? I am wondering if someone has the time to help me

[PHP-DB] Re: ECHO $variable

2006-10-08 Thread Ron Piggott
The database part of this is that I just retrieve $saved_message_title from mySQL and thought it was already escaped and am not sure what went wrong with the ECHO On Sun, 2006-10-08 at 01:32 -0400, Ron Piggott (PHP) wrote: In one of my scripts I have input type=text name=message_title size

[PHP-DB] mysql_real_escape_string

2007-02-16 Thread Ron Piggott
I am creating a form where I am using $web_site_# for the various fields. At the present time there are 11 fields I am asking the user to key in. I am wondering if there is a slick way to use the mysql_real_escape_string command with this so $web_site_1 =

[PHP-DB] NOT NULL query

2007-02-26 Thread Ron Piggott
Is it possible to do a SELECT query where field_3 isn't null? What would the syntax look like? Ron

[PHP-DB] auto_increment

2007-03-11 Thread Ron Piggott
How do I reset the auto_increment value to 1 in table abc? Ron

[PHP-DB] auto_increment command

2007-03-11 Thread Ron Piggott
I am not sure if that last e-mail went through or not. I am wondering how to re-set the auto_increment field back to 1 in one of my tables. Ron

[PHP-DB] Values in a date field

2007-03-17 Thread Ron Piggott
I have a $subscription_begins variable. It the date type. -MM-DD How may I find out the month value (1 to 12) of this variable? Ron

[PHP-DB] IF ( $_POST['submit'] == Update Subscriptions OR $_POST['submit'] == Update Entire Account ) {

2007-03-18 Thread Ron Piggott
I am wanting to ask a question about IF statements. I have been developing a PHP mySQL based subscription tracking application. I am trying to set up an administration screen now where admin could update an address, e-mail address, subscription(s), etc. OR (and this is the key) update the

[PHP-DB] Geeky question

2007-04-06 Thread Ron Piggott
Is there a way to find out what dates Easter will be in PHP for 2008, 2009, etc.? Ron

Re: [PHP-DB] Geeky question

2007-04-06 Thread Ron Piggott
sunday after the first full moon following the veneral equinox. Not sure of the spelling for veneral, but someone may know what I mean. I think this is a crazy to calculate it - but it uses some other calendar I believe. HTH steve Smith - Original Message - From: Ron

Re: [PHP-DB] Geeky question

2007-04-06 Thread Ron Piggott
moon following the veneral equinox. Not sure of the spelling for veneral, but someone may know what I mean. I think this is a crazy to calculate it - but it uses some other calendar I believe. HTH steve Smith - Original Message - From: Ron Piggott [EMAIL PROTECTED] To: PHP

[PHP-DB] DATE

2007-04-06 Thread Ron Piggott
Would someone help me with this --- How do I get the results for 2 days before Easter Sunday from this --- what do I have to do to my date statement to figure out Good Friday? $good_Friday = date(Y-m-d, easter_date($current_year));

[PHP-DB] auto_increment

2007-04-13 Thread Ron Piggott
Does anyone see anything wrong with the $query syntax? Ron mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( Unable to select database); $query=ALTER TABLE sessions auto_increment = '1'; mysql_query($query); mysql_close();

RE: [PHP-DB] RE: auto_increment

2007-04-17 Thread Ron Piggott
. -- If neither of these help, the actual error message may be of use. -Logan -Original Message- From: Ron Piggott [mailto:[EMAIL PROTECTED] Sent: Friday, April 13, 2007 10:04 PM To: PHP DB Subject: auto_increment Does anyone see anything wrong with the $query syntax? Ron

[PHP-DB] SELECT string

2007-04-23 Thread Ron Piggott
I am looking for help to write a SELECT syntax to help me process a directory searching query tool I am developing. If you start at http://www.actsministrieschristianevangelism.org/ministrydirectory/ and under 'Step 1:' click Business a form is displayed. My question is how would you

[PHP-DB] mysql_real_escape_string

2007-04-27 Thread Ron Piggott
The following PHP command $new_maintainers_notes = mysql_real_escape_string($new_maintainers_notes); returned this error while running in a ***cron***. Warning: mysql_real_escape_string(): Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) in

[PHP-DB] Making labels

2007-10-05 Thread Ron Piggott
Has anyone using a mySQL table to make labels?  Where would you get started?  I have a table that has a name field and then 5 address lines.  I would like to take this and format it for an avery 5160 label --- that kind of labels that are 3 columns x 10 labels.  Thoughts?  Please send any

[PHP-DB] Variables Forms

2007-10-16 Thread Ron Piggott
I am programming a form this morning.  I don't understand arrays really well.  I think this is what I am needing to use, but I am really not sure. I have a PHP script that checks a POP e-mail address and is suppose to take the incoming message and save it to a mySQL table based on the subject

[PHP-DB] inner join

2007-10-21 Thread Ron Piggott
Can you inner join 3 tables together? Do you know what the syntax would be? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] inner join

2007-10-21 Thread Ron Piggott
Thanks guys. That is really cool ... 3 tables all working together. Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] mysql_real_escape_string()

2007-11-12 Thread Ron Piggott
Last week the server my web site hosting company uses went down (along with a bunch of other servers) My files have been moved to another server the company uses. I am in the midst of configuring my site for the new server. Before the server went down I wasn't getting error messages. I know my

[PHP-DB] UPDATE with INNER JOIN?

2007-12-12 Thread Ron Piggott
Is it possible to do an UPDATE with an INNER JOIN --- I want the WHERE to use 2 tables in selecting which rows are going to be updated in table1. Could you provide me with a simple example if this is possible using the following variables: table1 table2 table1.field1 table1.field2 table2.field1

[PHP-DB] UPDATE syntax

2007-12-13 Thread Ron Piggott
Can anyone see something wrong with this syntax? UPDATE `advertisements` INNER JOIN `advertisements_rate_plans` ON `advertisements.rate_plan` = `advertisements_rate_plans.reference` SET `advertisements.displayed` = 0 WHERE `advertisements.start_date` = '2007-12-13' AND `advertisements.end_date` =

[PHP-DB] decimal point

2007-12-15 Thread Ron Piggott
How do I get the decimal point back when I am retrieving from a column that is set up as: rate decimal(4,2) Example: Right now it is giving me 800 instead of 8.00 Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] decimal point

2007-12-15 Thread Ron Piggott
Stevens wrote: What's your insert statement? On 12/15/2007 05:11 PM, Ron Piggott wrote: How do I get the decimal point back when I am retrieving from a column that is set up as: rate decimal(4,2) Example: Right now it is giving me 800 instead of 8.00 Ron -- PHP Database

Re: [PHP-DB] decimal point

2007-12-16 Thread Ron Piggott
an abstraction library? Perhaps that's the problem? -Micah On 12/15/2007 07:13 PM, Ron Piggott wrote: INSERT INTO rate_plans VALUES ( '12', 'One Week', '1', '2', '2', '8.00' ) When I use $advertisement_rate = mysql_result($rate_plan_result,0,rate); $advertisement_rate has

[PHP-DB] Querying Displaying a pricing table

2007-12-24 Thread Ron Piggott
I am trying to query my rate_plan table and then display the results in a table format. I need help developing then SELECT syntax and how I am able to echo the results in a table. I want to display the results 7 columns, 4 rows. There are 7 tenures: I have rate plans set up for: 1 week (term

[PHP-DB] Querying Displaying a pricing table

2007-12-24 Thread Ron Piggott
I was thinking more after I sent the post. I would like to retrieve the results into an array, if it is possible. Does this make sense? What I am wanting to display are the dollar values for the rate plans. Thanks for the help. Ron -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] Query table / results to an array

2008-02-28 Thread Ron Piggott
I need help populating an array based on the output of a mysql query. $reference_number is a value assigned by auto_increment $description is what I want the value of the array to be --- a few words in length $reference_number = mysql_result($search_result,$i,reference_number); $description =

[PHP-DB] Case sensitive query

2008-03-06 Thread Ron Piggott
Is it possible to do a case sensitive query to mySQL? What would an example syntax look like? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Multiple values in SELECT query

2008-03-09 Thread Ron Piggott
What is the correct syntax for where the results may be 1 or 2? What have I done wrong? SELECT * FROM table WHERE name LIKE ABC AND listing_type = 1 or 2 ??? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] SELECT query from two tables

2008-03-09 Thread Ron Piggott
I am wondering what is wrong with this syntax? SELECT * FROM ministry_directory INNER JOIN ministry_directory_listing_categories ON ministry_directory.entry = ministry_directory_listing_categories.ministry_directory_entry WHERE ministry_directory.listing_type = 2 AND

Re: [PHP-DB] SELECT query from two tables

2008-03-09 Thread Ron Piggott
Two different rows Chris. reference ministry_directory_entry ministry_directory_category_reference 13 1 10 14 1 11 What I am trying to do is allow the user to make a more specific search. Ron On Mon, 2008-03-10 at 10:37 +1100, Chris wrote:

Re: [PHP-DB] SELECT query from two tables

2008-03-09 Thread Ron Piggott
= mdlc.ministry_directory_entry WHERE md.listing_type = 2 AND mdlc.ministry_directory_category_reference IN (10, 11) ORDER BY ministry_directory.name ASC Regards, Bruce Ron Piggott [EMAIL PROTECTED] 10/03/2008 10:33:13 a.m. I am wondering what is wrong with this syntax? SELECT * FROM

[PHP-DB] Query

2008-04-30 Thread Ron Piggott
I have an interesting question. When I run the following query through my PHP script it produces 1 result. I know this because I echo the value of $num to the screen from the following syntax: $num=mysql_numrows($result); When I do the query in the SQL tab of phpMyAdmin there are 6 results. The

Re: [PHP-DB] Query

2008-04-30 Thread Ron Piggott
You just drew my attention my include that brings in the site menu and was changing the conflict. Thanks :) Ron On Thu, 2008-05-01 at 13:19 +1000, Chris wrote: Ron Piggott wrote: I have an interesting question. When I run the following query through my PHP script it produces 1 result

[PHP-DB] Submit Button variable passing

2008-05-03 Thread Ron Piggott
In the PHP script below I need to be able to pass on the value of 'reference' within the shopping_cart_product table when the Delete Category and Rename Category buttons are clicked. How do I do this? Ron mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die(

[PHP-DB] Shopping cart session handling

2008-05-04 Thread Ron Piggott
I am writing a shopping cart. I wanted some input on session handling for a shopping cart that is secure. At this time I am not programming for credit card processing. I am going to forward onto PayPal for payment initially. But I want to do a good job with security. Ron -- PHP Database

[PHP-DB] Inner joining 3 tables

2008-05-10 Thread Ron Piggott
How do I inner join 3 tables together? What would the syntax look like for this situation: Table 1 and table 2 have a common field; Table 2 and table 3 have a common field Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Saving an array to a mySQL table

2008-05-13 Thread Ron Piggott
I am writing a shopping cart. I am now ready to take the order from being in a session variable $_SESSION['product_selected'][$product_reference_number] to store it into the orders table. While the products selected are being displayed in a loop I have the piece of code $final_order .=

[PHP-DB] Re: Saving an array to a mySQL table

2008-05-13 Thread Ron Piggott
If I wasn't clear I am trying to figure out how to save an array in a mySQL table, both the array and it's value ... in this instance the product reference and the quantity the customer has decided on. Ron On Tue, 2008-05-13 at 23:11 -0400, Ron Piggott wrote: I am writing a shopping cart. I am

[PHP-DB] Shopping cart shipping logic

2008-05-14 Thread Ron Piggott
I need help writing a mySQL query and syntax that will determine the shipping packing selected and will then determine the cost to ship. I have assigned dollar values to various packaging. I have a designed the following table which contains various packaging, the maximum size (in centimeters)

[PHP-DB] Re: Shopping cart shipping logic

2008-05-14 Thread Ron Piggott
) packaging_type int(1) packaging_image_filename varchar(40) package_length decimal(3,1) package_width decimal(3,1) package_height decimal(3,1) packaging_cost_to_ship_canada decimal(3,2) packaging_cost_to_ship_us decimal(3,2) packaging_cost_to_ship_international decimal(3,2) On Wed, 2008-05-14 at 23:12 -0400, Ron

  1   2   3   >