[PHP-DB] Eliminating character sets from DB entry

2006-04-30 Thread Chris Payne
Hi there everyone, Is there a way to allow Only English character sets in database entry with MySQL and PHP? I'm getting an awful lot of SPAM which is in Chinese/Japanese and i'd love to be able to block these charactersets from being inserted into my databases. Chris

[PHP-DB] listing question

2006-04-11 Thread Chris Payne
Hi there everyone, I have a little problem, I could do this with 2 seperate queries but if I can do it with 1 then even better ;-) I have to list items in numeric order IF the field isn't empty (ie: 0 comes at the top, followed by 1 etc ) and that isn't an issue as PHP with MySQL makes

RE: [PHP-DB] listing question

2006-04-11 Thread Chris Payne
Hi there, I tried something similar: $query = SELECT * FROM videos WHERE videomakers_website_url = '$x' AND privatepublic = 'public' AND producer_website LIKE '%$x%' OR videomakers_website_url LIKE '%$x%' ORDER BY videomakers_site_position ASC, video_title ASC LIMIT $offset, $item_perpage;

RE: [PHP-DB] Database abuse help needed

2006-03-10 Thread Chris Payne
); foreach($_POST as $key = $value){ if( in_array($value, $badWordsArray) ){ //$value was found in $badWordsArray } } http://us2.php.net/in_array -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 8:40 PM To: php-db

[PHP-DB] Database abuse help needed

2006-03-09 Thread Chris Payne
Hi there everyone, Is there a better way I can do this? if ($email == [EMAIL PROTECTED] OR $subject == Rulez666 Basically, if I have data coming from a form to a DB, is there a better way to say check EVERY variable for a specific set of words rather than doing $name, $subject etc

RE: [PHP-DB] Database abuse help needed

2006-03-09 Thread Chris Payne
} } http://php.net/manual/en/reserved.variables.php http://us2.php.net/manual/en/control-structures.foreach.php http://us2.php.net/strpos Yes, that's !== or === -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 5:21 PM To: php-db@lists.php.net Subject

[PHP-DB] PHPSession problem - help needed

2006-03-01 Thread Chris Payne
Hi there everyone, I recently installed PHP 5 on my windows dev machine and it works great BUT I can't get sessions to work correctly and so my database logins won't work from my programming - which on a dev machine isn't good. Can anyone see something that is wrong in the sessions part of my

[PHP-DB] Help Needed with malfunctioning query

2006-02-25 Thread Chris Payne
Hi there everyone, This line of code USED TO WORK but now it gives me a Coudln't Execute Query error: $query2 = SELECT word,def,photo MATCH(word,def) AGAINST ('$txtsearchword' IN BOOLEAN MODE) AS m FROM dictionary WHERE MATCH(word,def) AGAINST ('$txtsearchword' IN BOOLEAN MODE) LIMIT $offset,

RE: [PHP-DB] Help Needed with malfunctioning query

2006-02-25 Thread Chris Payne
Hi there, I'm using asd just to test the search, here's the output from the statement echoed to the screen: SELECT word,def,photo, if(locate('asd',word),1,2) as meFirst ,MATCH(word,def) AGAINST ('asd' IN BOOLEAN MODE) AS m FROM dictionary WHERE MATCH(word,def) AGAINST ('asd' IN BOOLEAN MODE)

[PHP-DB] FOUND THE PROBLEM WITH THE BAD CODE

2006-02-25 Thread Chris Payne
Hi there everyone, thanks to everyone for the help with the bad MySQL query. it turns out there was some bad JAVASCRIPT at the top and the search itself was fine, I tested it on my dev machine and just realized I have an older version of MySQL on here than on the server and the server was FINE

[PHP-DB] Sessions help needed !!!

2006-02-17 Thread Chris Payne
Hi there everyone, OK this script worked perfectly on my own apache webserver and I had to move it to the main live server, but for some reason it's not passing session values in the same way and i'm positive it's something damn obvious. On my server I can use: echo $credits_system; echo

[PHP-DB] Found the sessions solution :-)

2006-02-17 Thread Chris Payne
Hi Guys, Thanks for your prompt responses. I found if I put the below at the top of each page that needs to display the session data it works fine: foreach($_REQUEST as $key=$value) { $$key=$value; }; Chris

[PHP-DB] Strange rawlist behaviour

2006-02-06 Thread Chris Payne
Hi there everyone, Can anyone see a problem with the below code? It scans an FTP directory and adds the LAST item in that directory to the database (Being the latest item added) - however, if the directory only has 1 file in it it WON'T add anything, the system returns that the directory is

[PHP-DB] How can I solve this?

2006-01-18 Thread Chris Payne
Hi everyone, I am using PHP_SELF in order to get the current path on a dynamically created webpage. This gives me the following: /my_website/index.php My problem is, ALL I NEED is the directory name - no / or no index.php, how can I strip these out to leave JUST the folder name the

RE: [PHP-DB] How can I solve this?

2006-01-18 Thread Chris Payne
Wonderful thank you, it displays a single / before the dir name but I can remove that without too much trouble :-) Thank you. Chris try $x =pathinfo($_SERVER['PHP_SELF']); echo $x['dirname']; =C= | | Cal Evans | http://blog.calevans.com | | Chris Payne wrote: Hi everyone, I am using

[PHP-DB] http_referer question for DB access

2006-01-11 Thread Chris Payne
Hi there everyone, I have a system which dynamically creates a template based website which can be turned on or off by a switch, to access it a user would do http://www.websitename/templatename and then it would produce a 404 (NOT look for a dir as this allows me to use a DB switch to enable

[PHP-DB] Encrypting DB content

2005-12-30 Thread Chris Payne
Hi there everyone, I am about to launch the website for my complex where the homeowners can login and check their billing status etc .. what is the best way, with PHP and MySQL, to store an ENCRYPTED password into the database so that if someone got into the DB they couldn't read the password

[PHP-DB] Encrypting DB content THANK YOU and nlist help

2005-12-30 Thread Chris Payne
secure server is one that isn't turned on. :) A realistic solution is somewhere in-between this and no security at all. -Micah On Friday 30 December 2005 8:15 pm, Chris Payne wrote: Hi there everyone, I am about to launch the website for my complex where the homeowners can login and check

[PHP-DB] Quick question

2005-12-08 Thread Chris Payne
Hi there everyone, How do I set the following items with ini_set()? I looked at the manual but when I try nothing happens: * file_uploads * upload_max_filesize * max_input_time * memory_limit * max_execution_time * post_max_size Basically I need to

[PHP-DB] One final question regarding FTP :-)

2005-12-08 Thread Chris Payne
Hi there everyone, I found the PERFECT JAVA Applet for my PHP needs, it allows me to drag and drop and it uploads via FTP to the server very nicely with progress bar etc however, with this it doesn't send the file name to PHP which is what I urgently need. How can I list a directory

[PHP-DB] Mailer issue with PHP and MySQL

2005-11-18 Thread Chris Payne
Hi Guys, I'm using PHP with MySQL data to send a very important email to clients when they enter the recipients email address into the system. On the whole it works for ME, to either my yahoo email address or any of my own domains email addresses that I have, However, when my WIFE gets it

[PHP-DB] Drag and Drop with PHP and MySQL

2005-11-18 Thread Chris Payne
HI there everyone, I have a file upload system where you select via requester the file to upload, it then uploads it with PHP and stores the info in a MySQL database. Is there an interface / programming method I can use which I can DRAG a file from the desktop into an area in a form just as if

[PHP-DB] Sending multiple items via a single form field

2005-11-14 Thread Chris Payne
Hi there everyon, I have a set of form fields dynamically generated but each item must contain 2 pieces of data - the input from the field AND the id that the input represents from the DB. I had this info a while back but had a major HD crash and lost the info I had, how can I do this easily

[PHP-DB] Escaping Characters help needed

2005-09-23 Thread Chris Payne
Hi there everyone, Can any of you see why the below will not insert into my database? Hann Heritage Homes' Fall Circuit entry. Fabulous ranch floorplan w/walkout basement. Stunning great room w/FP, dramatic dining room, den, screened porch. Mullett kitchen with glazed birch cabinets and granite.

[PHP-DB] Brain not working, help needed :-)

2005-08-28 Thread Chris Payne
Hi there everyone, I have the following code: while ($row = mysql_fetch_array($sql_result)) { $id = $row[id]; $video_link = $row[video_link]; $video_thumbnail = $row[video_thumbname]; $video_title = $row[video_title]; $video_description =

[PHP-DB] DB formatting question

2005-08-27 Thread Chris Payne
Hi there everyone, I’m converting a video website from CGI to use Databases and they want me to keep their existing layout. However, I have a slight formatting problem. I’m using PHP with MySQL and what I have is this: Each page displays 6 videos, 2 are on the first row (Which has 3

[PHP-DB] Case sensitive

2005-08-24 Thread Chris Payne
ONLY, but when I add the address if I don’t put a capital infront of each part of the address it won’t show up. Any ideas how I can make it case INSENSITIVE? (Think that’s the correct phrase). Any help would really be appreciated. Thanks everyone Regards Chris Payne -- No virus

[PHP-DB] File read question

2005-07-22 Thread Chris Payne
every week which is what makes it more tricky for me. I use the fopen command to read the file and that's not an issue, I'm just not sure how to read the first row with all columns, any help would REALLY be appreciated. Regards Chris Payne

RE: [PHP-DB] File read question

2005-07-22 Thread Chris Payne
; } Is that what you mean? -Micah On Friday 22 July 2005 5:59 pm, Chris Payne wrote: Hi there everyone, I'm having to make an editor with PHP and MySQL for assigning column values that change (Long story), basically I can open the file and read it no problem, but how can I open a file and only display

[PHP-DB] Threading theory help needed

2005-06-20 Thread Chris Payne
Hi there everyone, I've written a simple forum in PHP for my website (It's an artistic Jean-Michel Jarre website called Planet Oxygene where I experiment with all things tech) but I want to add threading to my messages but I'm not sure of the theory for such a thing. For example, I know I

[PHP-DB] PHP/MySQL with Javascript

2005-06-15 Thread Chris Payne
Hi there everyone, Just a quick question, I have a login system that stores whether you are logged in or not with a PHP Session. However, I need it so when people submit a form to add an item to their cart that Javascript can pickup the PHP Value of whether people are logged in or not. I

[PHP-DB] Page refresh question

2005-06-08 Thread Chris Payne
Hi there everyone, I'm using PHP and MySQL in a shopping cart system but the client wants it so that when you add an item to the cart the page doesn't refresh and we all know with PHP the page MUST refresh in order to execute the MySQL query. Is it possible, maybe with javascript? That I can

[PHP-DB] Still having a form problem

2005-05-30 Thread Chris Payne
Hi there everyone, I'm still having problems with my form PHP data, I lost email for a couple of days due to a server crash on my account so don't know if this was answered or not (Sorry). Basically, I have a form which populates 25 entries at a time from a MySQL DB with PHP, you can

[PHP-DB] Form information

2005-05-24 Thread Chris Payne
Hi there everyone, I'm pulling data from my MySQL DB with PHP 4.2, and I have a quantity box for multiple items, what I'm not sure of is this: Say there are 8 products and they choose 3 by entering a quantity into each box, I can display that no problem BUT how can I capture the ID of each

[PHP-DB] replace question

2005-05-12 Thread Chris Payne
Hi there everyone, I'm pulling some sensitive data from a MySQL DB with PHP and the clients wants the first x amount of numbers displayed on the screen to be xx etc ... rather than the numbers, but wants the last 6 to be displayed, is there an easy way to do this? I understand this

[PHP-DB] String manipulation

2005-05-01 Thread Chris Payne
Hi there everyone, I'm working with a mysql Db where I have a single string that I have to split into 2 strings, the first character is the first name and I have that split off into it's own variable, but what I need to know is what's the best method to read the string again BUT ignore the

[PHP-DB] URL question

2005-04-29 Thread Chris Payne
Hi there everyone, My client needs to be able to have their url www.blahblah.com http://www.blahblah.com/ pickup the product number but I can't do it the way I'd want (which would be www.blahblah.com/?mls=examplenumber, instead they said it MUST be www.blahblah.com/examplenumber - how can I

[PHP-DB] Urgent DATA help needed

2005-03-22 Thread Chris Payne
Hi there everyone, My client suddenly dropped on me that they need to be able to search by date, IE: the past 1 day, 3 days, 5 days or 7 days. In the DB, the date format is: 2001-07-05 (For example) but I have no clue how to count the days in between to know how many days I am counting. Say

[PHP-DB] Date problem again ;-)

2005-03-22 Thread Chris Payne
Hi there everyone, OK I'm using the following in my query to display entries in the LAST 3 days: DATE_SUB(CURDATE(),INTERVAL 3 DAY) = ListingDate But it doesn't seem to affect the results, the date format in my DB column (ListingDate - datatype is Date) is 2000-00-00 as in year, month

[PHP-DB] Timestamp question

2005-03-22 Thread Chris Payne
Hi there everyone, I have to convert dates in the following format to a valid unix timestamp to be stored in a mysql DB, how should I write it for this format? 12/03/04 (Day,month,year) I'm not sure how to format it correctly. I've tried to following but I don't think it's right:

[PHP-DB] Why isn't this working?

2005-02-26 Thread Chris Payne
Hi everyone, Im trying to split a string by comma, but its not working, can you see any reason that the below doesnt work? $keywords = preg_split(',','$Agent_Rep'); Thanks Chris No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus

[PHP-DB] Table from an array?

2005-02-02 Thread Chris Payne
Hi there everyone Is it possible to create a database table from the first line of a CSV file? What I mean is, how would you create the table columns based on the CSV files columns? This would really help me out, as some times the table column counts change on data I have to import, so it

[PHP-DB] Best way to remove slashes?

2005-02-01 Thread Chris Payne
Hi there everyone, Whats the best way to remove slashes to stop the following from being output from a string: City = HYPERLINK file:///\\'Alliance\'Alliance\\\' Say the string is called $city, I tried the following: Stripslashes($city); but it didnt seem to work?

RE: [PHP-DB] GROUP BY? Urgent help needed with selection list

2005-01-23 Thread Chris Payne
queries would work, hence why I'm trying to do it all in a single query. Chris if you have kind of geo id number you could use that, failing to have that info, you could re-arrange the data to have Akron - Central, Akron - SE (so that all is in a standard format) Bastien From: Chris Payne

[PHP-DB] What is wrong with this query?

2005-01-22 Thread Chris Payne
Hi there everyone, Im trying to select data from 3 tables, Im using the following code: SELECT * FROM MLS, Cond, Comm ORDER BY Price DESC LIMIT 0, 50 But its not working, I thought this is how it worked but I guess Im wrong. Its just a basic query, but needs to pull all the info from

RE: [PHP-DB] What is wrong with this query?

2005-01-22 Thread Chris Payne
From: Chris Payne [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] What is wrong with this query? Date: Sat, 22 Jan 2005 23:44:29 -0500 Hi there everyone, Im trying to select data from 3 tables, Im using the following code: SELECT * FROM MLS, Cond, Comm ORDER BY Price DESC LIMIT 0

[PHP-DB] GROUP BY? Urgent help needed with selection list

2005-01-22 Thread Chris Payne
Hi there everyone, Im using the following code to populate cities from a huge database: select name=fm_city[] id=fm_city[] multiple option value=0Show All/option ? $sqla = SELECT DISTINCT(Area) FROM MLS_Listings ORDER BY Area; $sql_resulta =

[PHP-DB] Security Question

2005-01-16 Thread Chris Payne
Hi everyone, I have a security question, I want to see if I am right or wrong. I have programmed a system with PHP and MySQL, the main system resides on a secure server, but the client wants the login page on a NON-Secure server for marketing purposes. Am I the only one who thinks this is a

[PHP-DB] str_replace question

2005-01-05 Thread Chris Payne
Sorry if this already went through, my SMTP server was having problems. Hi there everyone, Im having a weird problem and Im not sure why, if I try to replace WHERE AND with just WHERE it wont do it, but if I try to replace WHERE or AND by themselves it WILL do it, but I cannot replace BOTH

[PHP-DB] str_replace question

2005-01-05 Thread Chris Payne
Hi there everyone, Im having a weird problem and Im not sure why, if I try to replace WHERE AND with just WHERE it wont do it, but if I try to replace WHERE or AND by themselves it WILL do it, but I cannot replace BOTH of them from a single string, is something wrong below? $additionalsql

[PHP-DB] Removing first word from a string?

2005-01-03 Thread Chris Payne
Hi there everyone, I am building a dynamic MySQL query for a project I am working on, but there are instances where it products WHERE AND instead of WHERE city etc .. due to the nature of the system I am developing. My question is, how can I remove the FIRST AND from a string if it is

RE: [PHP-DB] Looping within a string?

2004-12-16 Thread Chris Payne
PLUS the table data into a string? It has to be an HTML email and I'm stumped. I can send an email no problem, but not with all the data, just the last row in the data. Chris On Friday 17 December 2004 10:33, Chris Payne wrote: Im having to send an email with looped results, but Im having

[PHP-DB] String question

2004-12-14 Thread Chris Payne
Hi there everyone, I am having to read a string with text in, but the way the DB is written in the same string you have the price, for example CASARON 4G 50lb Sacks in Ton Lots $88.00 How can I strip out the 88.00 (Baring in mind it could be any number) into its own string?

[PHP-DB] Connecting to a remote server?

2004-11-29 Thread Chris Payne
Hi there everyone, I have written a program in PHP with MySQL as the DB backend, It works great but I need to be able to connect to a remote MySQL DB server for an Updates system Ive written, how do I connect to a remote MySQL server with PHP? Ive only ever done it with localhost. Thanks

[PHP-DB] Error Help

2004-11-29 Thread Chris Payne
Hi there everyone, Thanks to everyone helping with connecting to a remote server, works wonderfully now :-) I do have a final question, had a look online but couldnt find what I needed. Its hard to explain why, but basically individuals have my program on their HD, the DB is on their HD

[PHP-DB] Numeric question

2004-11-16 Thread Chris Payne
Hi there everyone, Just a quick question, Im having to calculate some values from an existing database, but on some of the results I get (For example) 0.5907 How can I limit the result to only 2 digits after the decimal point with PHP? Thanks Chris --- Outgoing mail

[PHP-DB] PHP / Javascript question

2004-11-15 Thread Chris Payne
Hi there everyone, I have a form with check boxes and with PHP I use the array feature for the form name. Now I need to check if the tickboxes are ticked and if not return an error, normally with javascript I would use: script language=JavaScript function validate_form ( ) { valid

[PHP-DB] session_destroy();

2004-11-08 Thread Chris Payne
Hi there everyone, I need to destroy a session in the browser so when they log out it clears all the session data from the browser, I have tried: session_destroy(); But it doesnt seem to do it as the browser keeps the same PHPSessionID. What is the best way to destroy a session and

[PHP-DB] How to get unique entries?

2004-11-02 Thread Chris Payne
Hi there everyone, Im listing entries by date in a dropdown box, but on some days there are 7-8+ dates the same, but I just need it to display each date ONCE in the dropdown, but for the life of me I cant remember the command to use to do this, can anyone please remind me? I know it was dead

[PHP-DB] Finding the highest number in a column?

2004-10-27 Thread Chris Payne
Hi there everyone, I am working with a very complex system where not all numbers are assigned 1, 2, 3 etc so there could be a row with the number 1 and then the next row could be 40 and so on Is there a way with PHP and MySQL to find out what the highest number is in a particular column

[PHP-DB] I can't seem to get Max() to work

2004-10-27 Thread Chris Payne
Hi there everyone, I cant seem to get the below to work with PHP and MySQL: $sql = SELECT MAX(FoodItemNumber) FROM menuitemsubs; What am I doing wrong? I need the highest number from the column FoodItemNumber, but it doesnt return anything unless I change the MAX() to a * and I dont

[PHP-DB] Lotus Notes DB to MySQL?

2004-08-27 Thread Chris Payne
Hi there everyone, I have a client who uses Lotus Notes for her database, now she wants it converted to MySQL, is that possible? What format is notes DB in? Basically I will write a new front-end and back-end for her so she doesn't need notes anymore (Nasty, nasty software) but I need to

[PHP-DB] Updating a table when using LEFT JOIN

2004-08-26 Thread Chris Payne
Hi there everyone, I am using the following to grab the data I need from several tables: $sql = SELECT * FROM vendorprices LEFT JOIN fooditems on (vendorprices.FoodItemNumber = fooditems.FoodItemID) WHERE vendorprices.VendorNumber='$VendorID' ORDER BY vendorprices.VendorItemNumber;

[PHP-DB] PHP Array to Javascript?

2004-08-25 Thread Chris Payne
Hi there everyone, I set an array using the following in PHP: $ringb[$i]=$complex_area; $i++; It cycles through my DB and stores the info, my question is, how can I convert it to a value that can be read in Javascript? I'm stumped. Chris

[PHP-DB] MySQL to EXCEL?

2004-08-17 Thread Chris Payne
Hi there everyone, I'm having a dilemma (Now that I have power back after the hurricane hit us directly in Orlando). Anyway, I need to export a database table to Excel, I can do it as a .txt file without a problem, but I can't seem to get it to put each column into a separate cell when I try

RE: [PHP-DB] MAIL() help needed :-(

2004-08-09 Thread Chris Payne
Hi there, Thanks for the help, I've sorted it out now - stupid me :-) You know what it's like sometimes, you work that hard on different things that something which should be really simple just goes over your head - well, it does mine anyway :-) Very much appreciated. Chris Hey Chris,

[PHP-DB] MAIL() help needed :-(

2004-08-08 Thread Chris Payne
Hi there everyone, I'm having a major problem. I'm trying to send a message FROM Windows XP Pro, now this is where it get weird - in some mail packages it WORKS, and in some it doesn't. Basically it's an HTML email which is sent when a form is completed, the results are stored in a DB and

[PHP-DB] Urgent JOIN help needed

2004-07-30 Thread Chris Payne
Hi there everyone, I'm new to JOINS and have followed some info in the MySQL manual but I'm at a loss, using the code I'll paste below, I get each result 4 times and I am confused as to why? Basically I'm trying to display ALL fields from the vendorprices table, and grab just the Description

[PHP-DB] JOIN question

2004-07-27 Thread Chris Payne
Hi there everyone, I'm transferring a client's product from a Visual Basic .NET ACCESS 2000 application to run on a custom install of Apache/MySQL/PHP which I created (With a custom installer which sets everything up for them). My question though, is on looking through their ACCESS

[PHP-DB] Column help needed (Table)

2004-07-08 Thread Chris Payne
Hi there everyone, I need my MySQL query to be displayed in a table, which is no problem, but I only want 2 results per row to be displayed - so if I had 10 returned results from my Database, it would display 2 per column on 5 rows. How can I do this dynamically? Any help would be really

[PHP-DB] MySQL variable question

2004-07-03 Thread Chris Payne
Hi there everyone, I'm using MySQL 4's built-in Boolean handling abilities with PHP 4 which works wonderfully, but I need to change: ft_min_word_len to be 3 characters instead of 4 for fulltext indexing, how can I change this as words such as cat etc ... are not showing up in my PHP

[PHP-DB] SELECT problem between MySQL 3.23 and MySQL 4

2004-07-01 Thread Chris Payne
Hi there everyone, I'm using Booleans in my searches (New to it) but it works perfectly on my local 3.23 version of MySQL, but on the main server which uses version 4 of MySQL I get an error so there's an error in my Syntax. Here's what I currently use: SELECT id, def, word, 0.2*(

[PHP-DB] Load Data infile help needed

2004-06-28 Thread Chris Payne
Hi there everyone, I'm having a problem loading in a text file, each column is enclosed with a and separated by a , but when I try the below, it loads in the data BUT it puts a to the left of each character. Any help would be really appreciated. Thank you Chris

[PHP-DB] PHP with Javascript tutorials?

2004-06-25 Thread Chris Payne
Hi there everyone, I've been looking on Google for PHP Javascript tutorials but I can't find any. I'm new to Javascript but can use PHP for what I need. I was hoping someone would know of a tutorial that would show how to use PHP to get 2-3 datasets which javascript can then use in forms.

[PHP-DB] Date help needed

2004-06-24 Thread Chris Payne
Hi there everyone, I have a problem, I currently have some code which populates a dropdown box - this code gives me every day for the next x amount of days (EG: a years worth of days), however what I really need to be able to do, is to find a way to display this data in the dropdown box but

RE: [PHP-DB] Date help needed

2004-06-24 Thread Chris Payne
:07:12 -0400, Chris Payne [EMAIL PROTECTED] wrote: Hi there everyone, I have a problem, I currently have some code which populates a dropdown box - this code gives me every day for the next x amount of days (EG: a years worth of days), however what I really need to be able to do, is to find

RE: [PHP-DB] Date help needed

2004-06-24 Thread Chris Payne
Hi there, A drop down with 365 days !?!? Isn't that a little big? Actually it's Fridays, Sundays and Tuesdays for 2 years (365 was an example) it's for an Admin for a client, and he asked that it be in a dropdown box and he's the boss, so he gets what he wants :-) One thing he wanted which I

[PHP-DB] URL Problem

2004-04-21 Thread Chris Payne
Hi there everyone, I have a problem. Basically this is what I need to do: Request behind the scenes (PHP) an ASP Url on a different website with the value pid=1 (Where 1 is an identifying number). Then I need PHP to listen to the response from that request as ASP will then return

RE: [PHP-DB] URL Problem

2004-04-21 Thread Chris Payne
Hi there, Thanks for the below, but I'll try to explain it a bit better. I don't have access to the ASP server, it's a general server setup for companies, to query their server you must use the ?pid=uniquecompanynumber as it tracks your IP to make sure the correct server is connecting. Anyway,

[PHP-DB] PHP Standalone?

2004-02-05 Thread Chris Payne
Hi there everyone, I need to produce a system which uses databases but NOT on a webserver, I heard something about a PHP distro that is being developed which acts like an executable, does anyone know anything of this? Any help would really be appreciated :-) Chris Payne

RE: [PHP-DB] PHP Standalone? (fwd)

2004-02-05 Thread Chris Payne
that can control and receive results from PHP. If you have any tips I would be really appreciative :-) I just download PHP-GTK. Chris Payne -- [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05

[PHP-DB] Functions

2004-02-02 Thread Chris Payne
Hi there everyone, I need to write a function (New to them but starting to get the hang of it) that will take the field from a form and then do operations on it (To remove bad characters, any entered mysql commands etc ) now that's not a problem, what I want to do though is write a generic

[PHP-DB] PHP with Sendmail

2004-01-02 Thread Chris Payne
HI there everyone, Is it possible to use PHP to check an email on the same server? I have a system setup for my newsletters which I want to expand, and basically when mails bounce back to a certain email address on the server as failed it would then read the email and remove the address from

[PHP-DB] retrieving email address from array

2004-01-02 Thread Chris Payne
Hi there everyone, I'm connecting to my mailserver and getting my messagebody, however what I need to do it take everything away but leave the email address that is in the array for processing. How can I take out JUST the email address from the Array? I really need to do this urgently as I

[PHP-DB] PHP Error or installation problem?

2003-12-25 Thread Chris Payne
Hi there everyone, I just upgraded my Linux installation of MySQL from 3.23 to 4.0 (Well, the latest production build). In Webmin everything is fine, I can login etc . BUT with PHP 4, the version I used for 3.23 with no modifications (Which may be the problem?) I am having problems

[PHP-DB] Reading emails with PHP

2003-12-18 Thread Chris Payne
Hi there everyone, A quick question, is it possible to read a failed mail email and pick out the failed email address? I have around 900 failed emails (Don't ask, long story) from a client and what I want to do is just put the emails in a folder and cycle through the folder and pickout the

[PHP-DB] Splitting a string by a ,

2003-12-05 Thread Chris Payne
Hi there everyone, I'm trying to split a string into an Array by a , but I kepe getting errors. Looking at the PHP manual, I thought it would be this way: $keywords = preg_split(,, $email); But it keeps saying that the , isn't an ending delimiter? Any help would be appreciated, i'm trying to

[PHP-DB] Great PHP Book i've come across

2003-12-02 Thread Chris Payne
Hey there everyone, Just found a great PHP/MySQL/Apache book, it's not as comprehensive as some books, but the topics it covers it covers VERY well, and i'm learning alot from it. It's called: Sams: Teach Yourself PHP, MySQL and Apache in 24 hours and it's by SAMS PUBLISHING. While it's not

[PHP-DB] Function Problem

2003-12-02 Thread Chris Payne
Hi there everyone, This code works fine until I put it into my function, then it still works BUT however many lines are in the file are multiplied. For example, if I have 3 lines with the following: [EMAIL PROTECTED], myname [EMAIL PROTECTED], yourname [EMAIL PROTECTED], ourname In THEORY

[PHP-DB] a LITTLE bug with my CSV importer :-)

2003-11-26 Thread Chris Payne
Hi there everyone, OK So I kind of have my CSV utility working nicely, except for one thing - if I import the file with PHPMyADMIN it imports over 1000 rows (Which is correct) but with the below code on the same file, it's only importing 92 rows, can anyone see anything obvious that's wrong?

Re: [PHP-DB] a LITTLE bug with my CSV importer :-)

2003-11-26 Thread Chris Payne
may want to try this also (instead of stating a size)... filesize($filename) This: while ($data = fgetcsv ($fp, 1, $d)) {Would be this: while ($data = fgetcsv ($fp, filesize($userfile), $d)) { Let me know... Roger Chris Payne wrote: Hi there everyone, OK So I kind of have my

[PHP-DB] Fixed CSV import problem

2003-11-26 Thread Chris Payne
Hi there everyone, Just a note to say i've fixed the CSV import problem, I had to excape the ' character that was in the array and now it imports all 1081 rows properly. Now I can relax and pass out LOL :-) Thanks for all the help, very appreciated. Chris

[PHP-DB] Empty Table command?

2003-11-26 Thread Chris Payne
Hi there everyone, Just a quick question which I can't for the life of me find the answer for on MySQL's website (Probably as i'm looking for the wrong term?) I want to know how to empty a table, is there an empty command or should I just tell it to delete everything? Chris

Re: [PHP-DB] Splitting a CSV file

2003-11-25 Thread Chris Payne
for the script send regularly some invisible content to the browser (eg send a HTML comment line every 100 lines of your CSV file) HTH Ignatius _ - Original Message - From: Chris Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 25, 2003

[PHP-DB] LIKE % command

2003-11-25 Thread Chris Payne
Hi there everyone, I'm doing a search in my DB using LIKE '%$word%' which works great, but it's not case sensitive, so if I search for bike it WON'T find BIKE, i'm using PHP and MySQL. Probably something very obvious LOL it's just a basic select using LIKE. Chris

[PHP-DB] Splitting a CSV file

2003-11-24 Thread Chris Payne
Hi there everyone, I'm writing an automation system to automatically insert data into a mysql database from a CSV file, and it works great - until I try to insert a large file, then it just doesn't do anything. I've set my PHP filesize to 10 Megs so that's not the issue, and a server timeout

Re: [PHP-DB] CSV Import Question

2003-11-18 Thread Chris Payne
Hi there, Yes, in the form itself there is an input field where you specify the character for import, as default it is set to , but you can change it to any. Chris On Tuesday 18 November 2003 13:07, Chris Payne wrote: any ideas? Here's the code: $row = 1; $handle = fopen

Re: [PHP-DB] CSV Import Question

2003-11-18 Thread Chris Payne
. If it works, then you know that is your problem. Chris Payne [EMAIL PROTECTED] wrote: Hi there, Yes, in the form itself there is an input field where you specify the character for import, as default it is set to , but you can change it to any. Chris On Tuesday 18

[PHP-DB] Thank you Karen

2003-11-18 Thread Chris Payne
Hi there Karen, Thank you you are a star, just tried your idea for the CSV import (With getting rid of the loop etc ) and it works perfectly, you've made an old man very happy LOL :-) Chris

[PHP-DB] CSV Import Question

2003-11-17 Thread Chris Payne
Hi there everyone, I have a 2 Column CSV file, and i'm trying to import it into the DB via a form, I have it importing fine with the first field (Called EMail) but I cannot get it to import the second column correctly (Called name). I know it's going to be something so obvious i'll pass out,

  1   2   3   >