Re: [PHP-DB] search of data base - again

2012-03-30 Thread Gavin
ysql.com/doc/refman/5.5/en/time.html> * |TIMESTAMP| <http://dev.mysql.com/doc/refman/5.5/en/datetime.html> Best Regards, Gavin On 30/03/2012 19:48, Lars Nielsen wrote: fre, 30 03 2012 kl. 20:00 +0200, skrev Matijn Woudt: On Fri, Mar 30, 2012 at 7:49 PM, Jim G

[PHP-DB] newbie: MySQL importing data from a variable

2001-03-12 Thread Gavin Tong
idea what I've done wrong or have an idea where I can read more about this problem your thoughts will be greatly appreciated. Sincerely, Gavin Tong

[PHP-DB] Decent Search Engine (for MySQL)

2003-11-26 Thread Gavin Amm
default min word length is >3, we have a number of words that are 3 chars & need them to be picked up in the search) & I really hope there are better options than the "LIKE" command (These seem to be very popular from my searching). Regards, Gavin -- PHP Database Mailing Lis

RE: [PHP-DB] Decent Search Engine (for MySQL)

2003-12-08 Thread Gavin Amm
Shall I resign myself to using a search with "like %var%"? Are there no other better methods? Maybe REGEXP has something to offer? -Original Message----- From: Gavin Amm Sent: Thursday, 27 November 2003 4:00 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Decent Search Engine (for M

[PHP-DB] Keeping the mailing list sain

2003-12-21 Thread Gavin Amm
Hi guys, So that I don't drive members of the mailing list insane: In Outlook XP (2002), I want to enable the "Out of office" feature; what I don't want to do is have it reply to every message posted to the PHP mailing list. Does anyone know how to create a rule, to do this? I really don't want

[PHP-DB] Pass database id through href

2004-04-13 Thread Gavin Amm
Hi. I want to update mysql database with parent value of page. I have several fields in my form. I have a generated map of web site pages as hyperlinks at end of form. (generated recursively) I want to be able to click on hyperlink & have it pass the "parent" value to the next PHP script. The poi

RE: [PHP-DB] Pass database id through href

2004-04-14 Thread Gavin Amm
by the php script is easy enough like this. Cheers, Gav -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, 14 April 2004 12:48 PM To: Gavin Amm Cc: PHP-mailist Subject: Re: [PHP-DB] Pass database id through href Gavin Amm wrote: > EXAMPLE: > (I kn

[PHP-DB] MySQL - counting number of instances of a word in a field

2004-04-27 Thread Gavin Amm
Hi guys, I'm trying to find a MySQL function(s) that will allow me to count the number of words in a field. For eg: [table: pages] id - title - keywords - body 1 - Home - home, page - This is my home page. Enjoy your stay. 2 - Feedback - feedback, form, contact - Please enter any feedback or

RE: [PHP-DB] Re: Multi search function (help)

2004-05-28 Thread Gavin Amm
For what it's worth, if you store your form fields in an array, you can loop through the array to search for isset & empty on each array element and have the array add the fields that are relevant to your sql statement. Doing this will also ensure that you won't have to modify your script (that ge

RE: [PHP-DB] Multiple SQL queries...?

2004-06-03 Thread Gavin Amm
Have you tried - GROUP BY email - ? > Nope... > HHmmm, this is really getting to me... > I can do distinct, I can count, but I can't combine the two? > Can't be that hard ;-) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database

[PHP-DB] LAMP

2004-08-02 Thread Gavin Amm
I'd really like to find a Linux distro that is a LAMP system right out of the box. (Linux, Apache, MySQL, PHP) Are there any out there? Cheers, Gav -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] LAMP

2004-08-08 Thread Gavin Amm
Thank you all for your input. I will try Suse 9.1. If that doesn't work, I can try the http://www.apachefriends.org/en/ distro. Regards, Gavin -Original Message- From: Gavin Amm Sent: Tuesday, 3 August 2004 10:40 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] LAMP I'd really li

RE: [PHP-DB] Generate Menu based on database structure

2004-10-11 Thread Gavin Amm
Ok, sounds good. Any hints? I've not touched this stuff before.. Will using classes allow multiple objects to be running at the same time making the script faster? Cheers, Gav -Original Message- From: graeme [mailto:[EMAIL PROTECTED] Sent: Wednesday, 6 October 2004 7:05 PM To:

Re: [PHP-DB] Safe / Secure Login Script

2004-10-05 Thread Gavin Amm
Sorry, I always forget to reply all... Original message bellow... -Original Message- From: Gavin Amm Sent: Tuesday, 5 October 2004 3:55 PM Subject: RE: [PHP-DB] Safe / Secure Login Script 1. Personal preference, but you may find sessions a better option (does not store user data (like

[PHP-DB] Generate Menu based on database structure

2004-10-05 Thread Gavin Amm
Hi guys, I need to generate a menu based on the content structure of my database. The data is structured using an 'id' & 'parent' relationship, for eg: id parent title 1 0 Home Page 6 1 My Page 2 9 6 My Page 3 15 9 My Page 4 21 6 My Page 5 22 9 My Page 6 23 22 My Page 7 2

RE: [PHP-DB] Generate Menu based on database structure

2004-10-19 Thread Gavin Amm
Thanks for the link. I've got a working JavaScript menu system; I wanted a PHP script that runs once/day to generate the tree structure in the JavaScript config file. That way each time I added a page to the database, it would be automatically added to the menu system. I'm still interested in the

[PHP-DB] Read Receipts

2002-09-17 Thread Gavin Nouwens
Just a small suggestion guys, but when posting messages to a mailling list, it's always a *good* idea to turn off the "Read Request" option!!! Thanks, -gav. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Mysql vs postgresql

2002-09-24 Thread Gavin Nouwens
Hi peoples, The company I'm about to partner with for hosting my websites is using postgresql for their database server. I currently use mysql for all of mine. What I'm trying to find out is peoples experiences using postgresql, any plusses or minusses, is it worth using these guys or finding a

[PHP-DB] Auto Increment

2002-10-07 Thread Gavin Nouwens
Hi peoples, Just wondering if it's possible with mysql to start an auto-increment field at a specified number instead of 0001? I could always just code it in php to add another number onto it to get it to the right start point, but leaves areas for human error to creep in! Any help would be app

RE: [PHP-DB] Obsession for Oil

2002-10-14 Thread Gavin Nouwens
CK, This isn't really the forum for this is it? | -Original Message- | From: CK Raju [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, 15 October 2002 2:30 PM | To: [EMAIL PROTECTED] | Subject: [PHP-DB] Obsession for Oil | | | Reports of US annexing Iraq appears to be highly disturbing. The o

[PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Gavin Amm
Hi, I'm trying to call a script with the "?=" after the php script name in the URL, but can't seem to pick up the variable to use in my script... any help would be greatly appreciated :) I'm calling the script with this url: http://localhost/Data/test/dbconnect2c.php?id=TestPage The section of t

RE: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Gavin Amm
[mailto:holmes072000@;charter.net] Sent: Thursday, 7 November 2002 1:20 PM To: 'Gavin Amm'; 'Php-Db (E-mail)' Subject: RE: [PHP-DB] Warning - newby question -- $_GET > I'm trying to call a script with the "?=" after the php script name in the > URL, but can't se

RE: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Gavin Amm
Hi, For some reason the page worked the 1st few times, now I get the error message (after making no changes to the code from when it worked...): (line 5 references the "$db = mysql_co..." line of code) Warning: Unknown MySQL Server Host 'mysql.db.*.net.au' (2) in /home/.../public_html/public/

[PHP-DB] storing(/retrieving) HTML from textbox fields

2002-11-14 Thread Gavin Amm
Hi, I'm having some trouble storing html into a MySQL table, it is typed into a html 'textarea'. actually, i can't even get basic text to be stored from the textarea. the mysql_query() works fine with standard text input fields alone. i try and insert the textarea data in the same way as i do the

RE: [PHP-DB] Email Encryption?

2002-11-17 Thread Gavin Amm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ookey, (i think Richard Hutchins' idea is a good one, and secure enough that most sites use this method... but if you want an alternative...) now i am a newby to security and PHP, but here's my logic: 1. During the account setup (presuming this is

RE: [PHP-DB] Email Encryption?

2002-11-17 Thread Gavin Amm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Check out this link: http://www.pgpi.org/dev/ It is not exactly PHP material, but maybe if you wanted to contact them & ask them about supporting PHP you might get a response (i'd be interested if you get a responce, as i think having that fu

[PHP-DB] $_get 2 variables

2002-11-19 Thread Gavin Amm
Hi, I'm wanting to retrieve data from my database using 2 conditions in the WHERE clause. How do i pick up 2 different variables from the URL? i can get just 1 variable easily (eg: http://localhost/myscript.php?var1=blah) My question essentially is: what string do do i need to type into the URL t

RE: [PHP-DB] $_get 2 variables

2002-11-20 Thread Gavin Amm
Thanks Ryan, Ignatius. -Original Message- From: Ryan Gallagher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 20 November 2002 5:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] $_get 2 variables Quoting Gavin Amm <[EMAIL PROTECTED]>: > Hi, > > I'm wanting to r

[PHP-DB] Check data exists in MySQL

2002-11-20 Thread Gavin Amm
Hi, I'd like to test to see if data exists in my table ("count"), and if not insert some: This is seudo code of what I'd like: $sql = "SELECT num FROM count WHERE col1=$var1 AND col2=$var2"; IF $sql returns an EMPTY SET { INSERT INTO count VALUES('$var1', '$var2', "0"); } This is the code i

RE: [PHP-DB] Email Encryption?

2002-11-20 Thread Gavin Amm
ok, here's an idea: Either use a script off the web, or write your own: During the initial SSL session setup: - send an e-mail to the client with a web page attached. (include instructions in the e-mail) Put javascript into the page to decrypt RC5 (apparently you can get a patch for MySQL

RE: [PHP-DB] Check data exists in MySQL

2002-11-20 Thread Gavin Amm
Hi, for some reason i'm getting an error when I try to run this query: __ $sql="SELECT num FROM count where dept='$dept' AND deptsub='$deptsub'"; $page_count = mysql_query($sql,$db); # If does not exist in the database, insert a new entry if (!mysql_num_ro

[PHP-DB] Updating data

2002-11-24 Thread Gavin Amm
Hi, I'm trying to update a table ("count") & have been staring at it for a while now & can't see why it won't update... here's the code: $page_count = $page_count + 1; $sql = "UPDATE count SET num='$page_count' WHERE dept='$dept' AND deptsub='$deptsub'"; $result = mysql_query($sql, $db); when

RE: [PHP-DB] Updating data - don't worry, resolved.

2002-11-24 Thread Gavin Amm
I've realised my problem, i was trying to read the number of rows & add 1 to that. (instead of the data in the num field & add 1 to that...) of course it will return 1 each time! Gav -Original Message- From: Gavin Amm [mailto:[EMAIL PROTECTED]] Sent: Monday, 25 November

[PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-27 Thread Gavin Amm
Hi, I'm trying to pick up data from my MySQL database, use a foreach loop to extact the data from the result & put that data into a select list. I have tried the following code with & without the $row = ... line, both unsucessfully: -select- $value\n";} ?> I get the following er

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-27 Thread Gavin Amm
002 3:44 PM To: Gavin Amm Cc: Php-Db (E-mail) Subject: Re: [PHP-DB] foreach loop from MySQL select query to HTML select list On Wed, 2002-11-27 at 23:33, Gavin Amm wrote: > Hi, > > I'm trying to pick up data from my MySQL database, use a foreach loop to > extact the data from th

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-27 Thread Gavin Amm
ok, i've looked around the web a bit more & it would appear you can't just use a foreach function, apparently you need to use a while{foreach{}} structure. i was hoping you could just use the foreach function? so this is the code now: -select- $value\n"; } } ?> but now th

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-28 Thread Gavin Amm
{$row['dept']}\n"; } ?> cheers, Gav -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, 29 November 2002 2:59 AM To: 'Gavin Amm'; 'Php-Db (E-mail)' Subject: RE: [PHP-DB] foreach loop from MySQL select query to HTML select l

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-28 Thread Gavin Amm
thanks John, i was thinking along similar lines. that should work well. cheers, Gav -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, 29 November 2002 4:08 PM To: 'Gavin Amm'; 'Php-Db (E-mail)' Subject: RE: [PHP-DB] foreach loop from M

[PHP-DB] calling function on submit instead of going to a new script

2002-12-04 Thread Gavin Amm
Hi, I'm using some form fields on a page to pick up existing data from a MySQL database, make any changes, and update the database when i hit "submit". I've picked up the data ok, now i want to process the update... How do i call a function(?) on the same page rather than use another page through

[PHP-DB] Inserting a number into a list & moving all other numbers down

2002-12-09 Thread Gavin Amm
Hi, I'd like your opinion as to whether you think this code is reasonable, or if there is a better way to do this... I'd like to insert data in a particular order, so that i would take this eg: num val 1x 2y 3z and insert "a" as number 2 (from 2 text boxes), s

[PHP-DB] Breaking up new lines for e-mail

2003-01-07 Thread Gavin Amm
Hi guys, Would someone mind pointing me to a function, or some code, or give me a seudo-code start for the following: I'm using the mail() function. If someone submits the form with text in the multi-line textarea, any carrige returns (ie, by pressing ENTER) are taken out & the body is sent as a

RE: [PHP-DB] Re: Breaking up new lines for e-mail

2003-01-07 Thread Gavin Amm
-Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 8 January 2003 11:32 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Breaking up new lines for e-mail Hello, On 01/07/2003 10:11 PM, Gavin Amm wrote: > Would someone mind pointing me to a function, or some c

[PHP-DB] Members area

2003-01-22 Thread Gavin Amm
Hi All, I'm about to start development on a members area for a site. The members area will have 2 levels - Paid & Free, with the Paid members having access to more pages. I have not created a members area before & am after any advice or links I can get... I think a lot of reading is in order...

RE: [PHP-DB] Members area

2003-01-28 Thread Gavin Amm
ages. All links will be visible, but links for paid members will be clearly indicated. The purpose of this is to show freeloaders what they are missing! I hope this is clear. More experienced members of this list may well find flaws with my method. Good luck, Jeffrey Baumgartner eBusiness

RE: [PHP-DB] PHP and Sendmail

2003-03-13 Thread Gavin Amm
Chris, Just a thought. You could set up a linux system on an old pentium box & just use it as your mail server, thus no need to change your code if it is hard coded, just point to the new server. Gav -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED] Sent: Friday, 14 March

RE: [PHP-DB] PHP mail() question?

2003-04-01 Thread Gavin Amm
mmm, could you use a foreach loop? I think you will need to send separate mail items for each e-mail address you have stored in the database if you want to address it to them personally. Eg in seudo code: foreach($row_returned_from_database){ # variables & headers etc here # eg, $contactemail

RE: [PHP-DB] Reserve Username while Confirming Signup

2003-06-03 Thread Gavin Amm
I'm inexperienced with db's, but here are my thoughts: Maybe add a TIMESTAMP(14) field in your temp table, then run a script periodically to delete any rows stored that are more than, say, 20 mins old? Gav -Original Message- From: Dewi Wahyuni [mailto:[EMAIL PROTECTED] Sent: Tuesday, 3

[PHP-DB] Just can't get it to work.. variables

2005-03-29 Thread Gavin Amm
echo "".$monthVal." ".substr($row['start'], 6, 2)."\n".$row['details']."\n\n\n"; } ### ORIGINAL CODE ### while ($row = mysql_fetch_array($result)){ $monthName = array ("", "Jan", "Feb", &q

RE: [PHP-DB] Re: Just can't get it to work.. variables

2005-04-07 Thread Gavin Amm
sed on my previous e-mail, so all's well. Cheers, Gavin -Original Message- From: David Robley [mailto:[EMAIL PROTECTED] Sent: Friday, 1 April 2005 12:06 AM To: php-db@lists.php.net Subject: RE: [PHP-DB] Re: Just can't get it to work.. variables Gavin Amm wrote: > Yeah, I

RE: [PHP-DB] Re: Just can't get it to work.. variables

2005-03-30 Thread Gavin Amm
Yeah, I ended up doing that (associative array) then reading your e-mail.. Oh well, thanks. I couldn't cast the var as an int. in the database it's setup as a timestamp(8) (mmdd), not sure why I set it up as such.. Cheers, Gavin -Original Message- From: Martin Norland [mai

[PHP-DB] Limit chars from select

2006-01-29 Thread Gavin Amm
How do I limit the characters a Select statement returns? In Seudo code: SELECT * FROM myTable LIMITCHARS 30; I'm using MySQL. Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Limit chars from select

2006-01-29 Thread Gavin Amm
The 1st page is a sumary page of a number of the rows, so what I'm wanting to do is limit the display on initial sumary page to say 100 chars per field and then if they click on the row for more info I can then display the full info. -Original Message- Sent: Monday, January

Re: [PHP-DB] Connecting PHP to MySQL on Windows

2011-01-07 Thread Gavin Chalkley
Mike, A plain HOST file should have the commented part at the top, and only 1 reference to localhost unless you are creating Virtual hosts. I would suggest removing the "::1" line BR Gavin On Fri, Jan 7, 2011 at 4:18 AM, michael manning wrote: > Hi, > > I swapped

[PHP-DB] PHP.ini file

2011-04-30 Thread Gavin Chalkley
Afternoon all. I have a dev server using XAMPP, and am wondering if somone could point how to add a custom php.ini file? I have the ability to do this on the live server but am unsure how to make this read on the dev server? -- Best regards, Gavin C -- PHP Database Mailing List (http

Re: [PHP-DB] PHP.ini file

2011-05-02 Thread Gavin Chalkley
king a backup of your existing php.ini file > first. > > Regards, > > Barry > > On Sat, Apr 30, 2011 at 4:27 AM, Gavin Chalkley > wrote: >> >> Afternoon all. >> >> I have a dev server using XAMPP, and am wondering if somone could >> point how to ad

Re: [PHP-DB] ORDER BY DESC

2011-06-20 Thread Gavin Chalkley
post_store = " . > mysql_real_escape_string($_GET['id']); > > > > Thank you in advance for your help. > > Chris > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Best regards, Gavin C

Re: [PHP-DB] Insert query error

2011-08-06 Thread Gavin Chalkley
Chris, Why not escape, and extract the data prior to Insert string? On 06/08/2011 05:41, Chris Stinemetz wrote: I am getting the following error trying to run the below query. Any suggestions on what I am doing wrong? Thank you, Something went wrong while inserting your store visitCannot add

[PHP-DB] Learning bound variables ??

2011-08-29 Thread Gavin Chalkley
Afternoon all. I am learning the base php at the moment and have come across scripting that has the following examples: "|header("Location: ".$this->referrer);" Could someone point me in a direction to learn about this osrt of thing? Or could some explain? Best regards, Gavin|| |

Re: [PHP-DB] Learning bound variables ??

2011-08-29 Thread Gavin Chalkley
Dian, I appreciate what it does and understand the redirect. What I am more refering to is the manner to which it is written On 29/08/2011 12:02, dian.armstr...@gmail.com wrote: It's redirect script on php. Cmiiw --Original Message-- From: Gavin Chalkley To: php-db@lists.ph

Re: [PHP-DB] Learning bound variables ??

2011-08-29 Thread Gavin Chalkley
variable it has stored. In non object syntax it would be written as header("Location: ". $referrer) regds amit "The difference between fiction and reality? Fiction has to make sense." On Mon, Aug 29, 2011 at 4:33 PM, Gavin Chalkley mailto:gavin.chalk...@gmail.com>

[PHP-DB] Mysqli_escape

2011-09-01 Thread Gavin Chalkley
Hey all, Just a quick question about escaping. Is it good practise to strip tags and trim prior to escaping? or is this just over the top? Cheers Gavin C -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] MOD_Rewrite

2011-09-20 Thread Gavin Chalkley
://www.knowledgesutra.com/forums/topic/10219-php-mod-rewrite-tutorial/ But i cannot get this to function. What I am trying to do is www.website.com/KEYNUMBER Could some one kindly help me out?? Regards Gavin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP-DB] Prepared Statements

2011-11-15 Thread Gavin Chalkley
te(); $stmt->bind_result($title, $live, $where); while($stmt->fetch()) { echo "$title\t -\t $live\t -\t $where"; } $stmt->close(); } How can i get the data i want to select into variables in this scenario (title and Live and

RE: [PHP-DB] PHP & Database Problems

2012-05-02 Thread Gavin Chalkley
Ethan, Some coding you are using would be helpful (as far as i am aware attachments are not support on the mailing list's) Gav -Original Message- From: Ethan Rosenberg [mailto:eth...@earthlink.net] Sent: 02 May 2012 19:54 To: php-db-lists.php.net; php-gene...@lists.php.net Subject: [PHP

RE: [PHP-DB] [PHP] PHP & Database Problems -- Code Snippets - Any more Ideas?

2012-05-04 Thread Gavin Chalkley
Ethan, You have been given advise and break down on your code. Have you taken the advise given? Which part of the code isn't working? Not which chunk, but break it down and show which part BR, Gav -Original Message- From: Ethan Rosenberg [mailto:eth...@earthlink.net] Sent: 04 May 201

RE: [PHP-DB] Multiple Database Connection Using Prepard Statements

2012-05-20 Thread Gavin Chalkley
Just remember to close the correct connection whn it is time to :) -Original Message- From: Matijn Woudt [mailto:tijn...@gmail.com] Sent: 19 May 2012 23:42 To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Multiple Database Connection Using Prepard Statements On Sat, May 19,

Re: [PHP-DB] Saving Image in mySQL

2013-03-20 Thread Gavin Chalkley
I am with Karl on this. Storing an image in the db is very heavy on lpad times. Upload the image to a folder with name saved with location On Mar 19, 2013 11:12 PM, "Karl DeSaulniers" wrote: > Hey Ron, > I don't know how others feel, but I say save yourself a headache and dont > store the image