[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

[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

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

2003-11-26 Thread Chris Payne
ch is $data[15]; if I remember correctly) it imports over 880 fields, but when that's in it only imports 92 - but I have no idea how to correct bad characters they may have put in the file (I have no control over the characters they use - sigh). I really appreciate your help on this. Rega

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

2003-11-26 Thread Chris Payne
x27;$data[4]','$data[5]','$data[6]','$data[7]','$data[8]','$data[9]','$date[10]','$data[11]','$data[12]','$data[13]','$data[14]','$data[15]','$data[16]','$data[17]','$data[18]','$data[19]','$data[20]','$data[21]','$data[22]','$data[23]','$data[24]') "); }; echo $count; fclose ($fp); Thanks for any help Regards Chris

Re: [PHP-DB] convert date in german format

2003-11-26 Thread Chris Boget
MySQL Manual. > Option 2 is to use UNIX_TIMESTAMP() in your query to retrieve the MySQL date > formatted as a Unix timestamp. You can then pass this value to the PHP > date() function and format it like you have above. Or option 3: strtotime() Chris -- PHP Database Mailing List (http

[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

Re: [PHP-DB] Splitting a CSV file

2003-11-25 Thread Chris Payne
e from a coding point of view :-) Again thank you everyone, I don't know what i'd do without you all. Regards Chris - Crazy, but slightly less so than this morning :-) > You may have hit the browser time-out limit, which you can not control (at > least for IE; don't kno

Re: [PHP-DB] Splitting a CSV file

2003-11-25 Thread Chris Payne
27;yes'; } else { $row = 1; $handle = fopen ("$userfile","r"); while ($data = fgetcsv ($handle, 10, "|")) { $num = count ($data); $row++; echo "$data[0];"; }; fclose ($handle); }}; Chris > I've never seen where the file size

[PHP-DB] Splitting a CSV file

2003-11-24 Thread Chris Payne
o select their CSV file (No matter what size) and it will insert it automatically, and as I said it does work on small files but not large :-( Any help would really be appreciated. Chris

[PHP-DB] Re: [PHP] SQLITE

2003-11-22 Thread Chris Shiflett
ke is an educated guess. SQLite uses the filesystem for storage. If your queries are needing to access the same file (maybe you're querying the same table), SQLite is going to serialize those queries to help you avoid threading problems. So, your queries are going to basically take turns. Hope th

[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

Re: [PHP-DB] CSV Import Question

2003-11-18 Thread Chris Payne
Hi there, Oh I know the , (Or $Delim) isn't the problem, I think your previous email may be the answer so i'll take a good look at that once i've eaten and if it works you're the best (Heck even if it doesn't you're all the best on this list ;-) Chris T

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: &

Re: [PHP-DB] CSV Import Question

2003-11-17 Thread Chris Payne
Hi there, > On Tuesday 18 November 2003 12:34, Chris Payne wrote: > > > 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 colum

[PHP-DB] CSV Import Question

2003-11-17 Thread Chris Payne
INTO emaillist (EMail,name) VALUES ('$data[$c]','$data[$c]') When I import, it puts all data in the EMail field, even the name field. Any help would be appreciated beyond belief as this is annoying the crapola out of me :-) Chris

Re: [PHP-DB] using code for multiple sites

2003-11-13 Thread Chris Boget
justing the include_path. What's the benefit of using an absolute path? If you did need to change the include path, you'd only have to do it in one file. Or am I misunderstanding what you are saying (likely)? Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Searching a name field

2003-11-06 Thread Chris Berlioz
Yes you have to break this up into fields that hold your Firstname, MI,Lastname. This has so many advantages, using PHP string function to query inside fields might be useful somewhere else, I wouldn't recommend it for use in a large DB. Divide and conquer! Espero este consejo te sirva, ese erro

[PHP-DB] KB in a query / column?

2003-11-03 Thread Chris Payne
pointers in the right direction :-) BTW, Using PHP and MySQL :-) Chris

[PHP-DB] Urgent help needed

2003-10-21 Thread Chris Payne
? Basically, aswell as sending the ID, I need to send the title and path too and i'm abit confused. Any help would be VERY appreciated :-) Thanks everyone. Chris

[PHP-DB] Re: crosstab (was "Re: [PHP-DB] Using two colomns ...")

2003-10-20 Thread Chris Boget
... You mean like taking results > 1 a > 2 b > 3 c > 4 d > and changing it to > 1 2 3 4 > a b c d > or such? I'm certainly confused. More or less, yes. exactly that. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Using two colomns of mysql data as key/value pairs in arrays

2003-10-20 Thread Chris Boget
> From: "Chris Boget" <[EMAIL PROTECTED]> > > My bad. > > If MySQL had crosstab functionality, that *might* be able to help. > A "crosstab" is just a specifically formatted query, of which MySQL is > certainly capable of handling. I've d

Re: [PHP-DB] Using two colomns of mysql data as key/value pairs in arrays

2003-10-20 Thread Chris Boget
> result set. Chris, you've made a believer out of me; I'll start using > mysql_fetch_assoc() for these kinds of queries from now on. :p > And in the spirit of only retrieving what you need from the database, I > would agree that mysql_fetch_assoc() is the "better&quo

Re: [PHP-DB] Using two colomns of mysql data as key/value pairs in arrays

2003-10-20 Thread Chris Boget
I must be quite confused. No, actually, I am the one who's confused. I misread the OP's email such that *_assoc() would do the job. My bad. If MySQL had crosstab functionality, that *might* be able to help. But I still stand by my assertion that *_assoc() is better than *_array() in al

Re: [PHP-DB] Using two colomns of mysql data as key/value pairs in arrays

2003-10-20 Thread Chris Boget
oting down someone who was being helpful, though, > when I made my response. It didn't seem like he was shooting you down. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Using two colomns of mysql data as key/value pairs in arrays

2003-10-20 Thread Chris Boget
a_seek( $result, 0 ); print_r( mysql_fetch_assoc( $result )); echo ''; ?> Especially if you use the foreach() construct, mysql_fetch_array() is bad news. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Using two colomns of mysql data as key/value pairs in arrays

2003-10-20 Thread Chris Boget
> mysql_fetch_array( $result ) Actually, for an associative array (which the OP had made reference to), you use mysql_fetch_assoc(). I avoid mysql_fetch_array() like the plague unless there is a very specific need. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP-DB] WHERE statement used multiple times.

2003-10-19 Thread Chris Wanstrath
gt; > http://personals.yahoo.com.au - Yahoo! Personals > > New people, new possibilities. FREE for a limited > time. You can put together WHERE statements with an AND or an OR. For instance, "SELECT id FROM users WHERE id='2' OR id='3'" You know, if you had

Re: [PHP-DB] Variables not working within Functions

2003-10-15 Thread Chris Wanstrath
You are using a variable outside of the function's scope. In the function, do this: global $username; Visit www.php.net/man to get a better understanding of globals and scope. On Wed, 2003-10-15 at 22:10, Adam Symonds wrote: > Hi, > I am starting to us functions with my work but I am having troub

Re: [PHP-DB] pass by reference

2003-10-09 Thread Chris Boget
> How do you pass by reference? I tried > $var = myFunction(&$var1, &$var2); > but it gave me a warning saying that pass by reference is depreciated function myFunction( &$var1, &$var2 ) { } You now have to do it in the function definition, not the function call.

[PHP-DB] Getting last insert id?

2003-10-08 Thread Chris Payne
, '$ForumID','$posted','$parentid') "); But once it has done this, I need to get the id it has generated in the DB and then update that record with the id it generate, so how can I get the id from the above insert? Any help would be greatly appreciated :-) Regards Chris

[PHP-DB] Red Hat 9 + MS SQL

2003-10-06 Thread Chris Frederick
connection to the database. Regular connections work fine. This used to work fine for a long time, and now it's not working. Any idea why this isn't working or how I could fix it? Thanks in advance for any help, Chris Frederick -- PHP Database Mailing List (http://www.php.net/) T

[PHP-DB] Re: MySQL Very Slow Work.

2003-09-25 Thread Chris Berlioz
You can always try indexing your data, this will improve your query speeds. Don't know how you are quering data, but would suggest using keys and "optimized" query expressions. You should also check your Win 2000 services running and anything that might interfere with your setup (ie: antivir, etc)

Re: [PHP-DB] Pop3?

2003-09-22 Thread Chris Payne
Hi there, Thanks for your help :-) Oh and I did read the manual, found it about 20 minutes after I sent the emeial but got sidetracked and forgot to post i'd figured it out in the group - sorry :-) Chris > On Mon, 22 Sep 2003 16:04:06 -0400 > "Chris Payne" <[EMAIL PRO

Re: [PHP-DB] Pop3?

2003-09-22 Thread Chris Payne
iable error, any ideas? BTW, I haven't touched your functions so they are the same as you sent to the list, I just changed the details for my pop3 server which logs in fine as if I put in a wrong password it knows it's wrong :-) Chris > On Sunday, September 21, 2003, at 11:58 PM,

Re: [PHP-DB] Pop3?

2003-09-21 Thread Chris Payne
Hi there, Thanks for that, very appreciated, just one question? Without meaning to sound dumb (Which I probably will) how do I call your function? I don't usually deal with functions, I know I need to start though ..... Chris > > On Sunday, September 21, 2003, at 10:53 PM,

[PHP-DB] Pop3?

2003-09-21 Thread Chris Payne
can insert selected data into a database backup (Hard to explain). Any help would be really appreciated :-) Regards Chris

[PHP-DB] Re: [PHP] Re: [PHP-DB] Graphs

2003-09-16 Thread Chris Sherwood
I found phpchartdirector to be a nice third party app http://www.hotscripts.com/Detailed/12237.html - Original Message - From: <[EMAIL PROTECTED]> To: "Balaji H. Kasal" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "PHP List" <[EMAIL PROTECTED]> Sent: Tuesday, September 16, 2003 10:12 AM Su

Re: [PHP-DB] Determining if checkbox is selected in PHP

2003-09-09 Thread Chris Boget
t; suggestions? if( isset( $_POST['keyword'] ) { foreach( $_POST['keyword'] as $checkboxValue ) { echo 'Checkbox ' . $checkboxValue . ' was checked'; } } Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Selection problem

2003-09-07 Thread Chris Payne
f I haven't confused you all to death :-) Regards Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Upload multiple files?

2003-08-29 Thread Chris Payne
g that solution out, it SHOULD work :-) Chris > Well... > > Having never done this I would assume it's the same with and form field > you want to use as an array (multiple selections). > > Create a few different fileselect fields all with the same name but > adding in [

[PHP-DB] Upload multiple files?

2003-08-29 Thread Chris Payne
? The image info is stored in a DB and the images themselves are on the server, this way I can do lots of nice things to manage the images that have been uploaded without having to access the filesystem too much (I love PHP and MySQL, makes it so easy). Thanks everyone. Chris

Re: [PHP-DB] Stange PHP bug?

2003-08-28 Thread Chris Payne
. I appreciate your help very much though, as sometimes the most annoying problems have the simplest solution (I'm an annoying problem but the only solution to me is to shoot me LOL :-) Chris > Chris, > > Wild guess here, but could this problem possibly be caused by your web

Re: [PHP-DB] Stange PHP bug?

2003-08-28 Thread Chris Payne
on Windows XP - the only difference is I use XP Pro for dev work. Very odd. Chris > Is is just your site. does he have problems with other internet/php sites? > i.e www.php.net? > > jeff > > > > "Chris Payne" > &

Re: [PHP-DB] Stange PHP bug?

2003-08-28 Thread Chris Payne
Though as I said before, PHP and MySQL aren't selective when they run and when they don't, they either work or you get horrible error messages :-) Chris > Chris, > > Like you say doesnt seem to be php, I'd be suspecting XP's firewall settings on his dial up connection, can you

[PHP-DB] Forget my last post

2003-08-28 Thread Chris Payne
Sorry everyone, forget my last post about the T_Variable, I was right it WAS a stupid question LOL :-) Chris

[PHP-DB] Can anyone see why unlink isn't working?

2003-08-28 Thread Chris Payne
Hi there everyone, I have image details stored in my DB, and i'm trying to remove the ones I select, but I keep getting an error saying that there is an unexpected T_Variable, can anyone see what is wrong here? It's probably obvious, but for the life of me if (count($del) >= 1) { for

[PHP-DB] Stange PHP bug?

2003-08-27 Thread Chris Payne
#x27;t, could it be his installation of Explorer? He's on dialup in the UK, but my friend from the UK is on broadband with the same setup and it works fine for him. Sorry this isn't an actual PHP/MySQL technical question, but I thought that somebody might be able to back me up as I think it's his browser. Any thought? Chris

[PHP-DB] Database backup

2003-08-27 Thread Chris Payne
yADMIN and exporting 1 DB at a time is going to take forever. My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP. Thanks, any help would be really appreciated (And save me alot of headaches). Chris

[PHP-DB] Importing CSV data

2003-08-24 Thread Chris Payne
to go through the CSV file, and import the EMail addresses into a record of their own (IE: id1,id2,id3 rather than all in 1 row)). Any help / code tips would be REALLY appreciated :-) Regards Chris

[PHP-DB] Images and PHP

2003-08-20 Thread Chris Payne
:-) Thanks Chris

Re: [PHP-DB] storing images in a table or in a directory

2003-08-20 Thread Chris Payne
Just a thought :-) Chris > Hi, > I have to manage a large amount of images uploaded by users on my site. > Using php/mysql I don't know if I should store the images in a directory > within the server or in a dedicated table. > What is the most suited method? > Thanks, best regar

Re: [PHP-DB] Best way to multi-thread (Kind of)?

2003-08-18 Thread Chris Payne
Hi there, Ahhh you're a life saver, thanks for that that really helps out alot - and makes sense when I think about it :-) Regards Chris > For each message have a autoincrement message ID, an INT field is sufficient I > would guess. > > Also in each message record, have a

[PHP-DB] Best way to multi-thread (Kind of)?

2003-08-18 Thread Chris Payne
al posters message. Any help would be VERY welcome. Regards Chris Payne

[PHP-DB] Is there a better way to write this?

2003-08-17 Thread Chris Payne
fo for the message listing. The forum name is NOT stored in the actual messages table, it's in the forum index table I created. The code I use is: Thanks for taking a look :-) Chris

[PHP-DB] Re: MySQL and PHP?

2003-08-14 Thread Chris Berlioz
Read: http://www.mysql.com/products/licensing-examples.html === "Richard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello > > I hope this is a rumour but I heard that MySQL is now fully GPL which it > wasn't earlier. > I think the part used to communicate with the

[PHP-DB] Re: Conection to MS SQL 2000 from PHP in Linux

2003-08-09 Thread Chris Berlioz
Try reading this on PHP site, documentation here is pretty useful. http://us4.php.net/manual/en/ref.mssql.php Suerte. == "Jean Fernando Ortiz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all! > I need to know how I must connect to MS SQL Server 2000 in a Win

[PHP-DB] Form Submitting

2003-07-29 Thread Chris Payne
PHP or JScript will do it. Thanks Chris

[PHP-DB] Re: Pros/Cons Database vs Excel

2003-07-23 Thread Chris Berlioz
You can achieve much more with a Database backend, if your boss likes spreadsheets (XLS) then you can always export from any database backend (which ever one you want). He can still keep hyperlinks etc for web access etc if he would display the database results onto webpages/excel/text/etc!. Perha

[PHP-DB] permission...

2003-07-23 Thread Chris Mach
When I get a warning like below, is that something I can fix by modifying the code? or is that some configuration that need to be changed on the server? Warning: unable to create file files/sked.html because Permission denied in /server3/home/cjmach/public_html/newfile.php on line 14 I get this w

[PHP-DB] write to word..

2003-07-22 Thread Chris Mach
If it is possible, could some one point me in the right direction. Like where to look in the manual. Thanks, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] One last question on find and replace

2003-07-21 Thread Chris Payne
nes / paragraph formatting. Any help would be appreciated :-) Chris

Re: [PHP-DB] Find and Replace

2003-07-21 Thread Chris Payne
Hi there, Ahhh thanks, that was a quick way to do it, I took the long way around LOL :-) I grabbed the data, did $article = str_replace("", "", $article); and then looped through all of the entries to change it, it seems to have worked though :-) Chris > Chris Payne

[PHP-DB] Find and Replace

2003-07-21 Thread Chris Payne
DB). Using PHP, how can I write a simple script to go through all the entries for a column (Called articles) and remove all instances of or ??? It would take far too long to do it page by page :-( Thanks for all your help everyone. Regards Chris Payne

[PHP-DB] Re: commas

2003-07-17 Thread Chris Mach
Thanks guys! number_format() works great!! "Chris Mach" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there a function that will strip or add commas? > > I'm trying to do calculations with attendance numbers of football games... > for example:

[PHP-DB] commas

2003-07-17 Thread Chris Mach
Is there a function that will strip or add commas? I'm trying to do calculations with attendance numbers of football games... for example: 33,153 right now I don't have a comma for the numbers in the database. So the above example is 33153 in my database. If I put the comma in, when I try to do

[PHP-DB] PHP with Javascript

2003-07-14 Thread Chris Payne
late the second box without having to refresh the whole, page so any ideas/examples would be very welcome :-) Thanks for everything. Chris

[PHP-DB] Re: any Help !! the only way have to ODBC to Linux

2003-07-14 Thread Chris Berlioz
Go to http://www.mysql.com/downloads/api-myodbc.html or http://www.mysql.com/downloads/api-myodbc-3.51.html and download the driver for linux. Hope this is what you were asking for. Chris = "Nabil" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I h

[PHP-DB] Date problem

2003-07-14 Thread Chris Payne
everyone as my brain has probably fried :-) But here's the code, when I convert it back to d,m,Y it says it's 2004 which it shouldn't. Thanks Chris --- $secsinweek = 604800; $numweeks = $secsinweek * 7; $curdate = date("d-m-Y"); // Split the strings into day,

Re: [PHP-DB] question about '

2003-07-11 Thread Chris Payne
Hi there, The problem is the data is already in the DB, it was mass-added with the ' already there, what I need is a way to retrieve the ' that is already in the DB. Thanks Chris > yes, by adding stripslashes it will somewhat escape those quotes ('), > but when display

[PHP-DB] question about '

2003-07-11 Thread Chris Payne
nd stripslashes etc . but not sure if that's relevant to this being that the data in the DB has a single ' already there. Anyway help would be appreciated :-) Regards Chris

[PHP-DB] mssql_bind problems

2003-07-09 Thread Chris Wright
I am running PHP 4.3.2 and MS-SQL 2000. I am trying to run some sample code to make sure all works well. The code below works fine. It simply inserts a record into a table. This is done in the stored procedure code on the SQL server. Code that works: $myServer = "192.168.200.28"; $myUser = "s

Re: [PHP-DB] Image upload get file dimensions

2003-06-23 Thread Chris Payne
Hi there, Thanks just found this page as your email arrived :-) Appreciate the pointer though. Chris > http://us4.php.net/manual/en/function.getimagesize.php > > > Hi there everyone, > > > > In short, I use the following to upload an image to the server: > >

[PHP-DB] Image upload get file dimensions

2003-06-23 Thread Chris Payne
uploaded image so that I can store this information in the DB? Thanks for your help everyone :-) Chris

[PHP-DB] Re: order by an average in another table (basically a "top 10" list)

2003-06-18 Thread chris
On Wed, 18 Jun 2003 16:06:23 -0400, Chris <[EMAIL PROTECTED]> wrote: I've done a google search, but most of the results are for the part I've already figured out. People that have the "top 10" sorting usually want money for their system (one wanted an absurd $500).

[PHP-DB] order by an average in another table (basically a "top 10" list)

2003-06-18 Thread chris
I've done a google search, but most of the results are for the part I've already figured out. People that have the "top 10" sorting usually want money for their system (one wanted an absurd $500). I'm working on a database application where users vote on how much they like a particular picture

[PHP-DB] Re: Get last id in postgresql

2003-06-18 Thread chris
On Mon, 16 Jun 2003 21:13:14 -0500, Norma Ramirez - Tecnosoft <[EMAIL PROTECTED]> wrote: Hi all, I´m starting with posgresql and i trying to use pg_last_oid to get the last id in a insert query, but this function returns me a big number like 21318 and bigger, but the table just have 3 or 4 reco

[PHP-DB] Strange phpmyadmin 2.2.3 bug?

2003-06-13 Thread Chris Payne
I put it into a text block thinking that the HTMl caused a problem but it doesn't. Anyway help would be appreciated as it's driving me nuts :-) Chris Antigua claim to have a different beach for every day of the year although we have not visited them all the islands many beautiful sof

Re: [PHP-DB] How to find the last ID?

2003-06-06 Thread Chris Payne
Hi there, Thanks for your quick reply, very appreciated :-) Chris > hi > > you can easily do this by using > > mysql_insert_id(); > > see > http://www.php.net/manual/en/function.mysql-insert-id.php > > .ma > > e: [EMAIL PROTECTED] > w: http://www.ab

[PHP-DB] How to find the last ID?

2003-06-06 Thread Chris Payne
Hi there everyone, I'm creating a new entry using the following: mysql_query ("INSERT INTO agents (agent_name) VALUES ('$agentname') but I need to find out the ID value it created, how can I do this easily? Thanks Chris

[PHP-DB] Is it worth upgrading Mysql on linux?

2003-06-06 Thread Chris Payne
advantages of upgrading to 4.0 ? Will I need to recompile PHP to use MySQL 4? This kind of thing is new to me (Linux as I used to use Windows). Thanks for everything. Chris

Re: [PHP-DB] Array Pointer

2003-06-05 Thread Chris Mach
My database is set up in this way: fan_roster: has player id (play_id) , week, and stats on that player for that week. So there are 20 records for each player, because there are 20 weeks. So what I need to do is add up all the players weekly totals. so pass_yrd1 for week1 + pass_yrd1 for week2 et

Re: [PHP-DB] strip

2003-06-04 Thread Chris Mach
= str_replace("'", "''", $value); > > - Frank > > > Don't. addslashes() instead. > > > > Chris Mach wrote: > > > > >does anyone know how to strip a ' from a string? It's causing errors > for my > >

[PHP-DB] strip

2003-06-04 Thread Chris Mach
does anyone know how to strip a ' from a string? It's causing errors for my sql statements -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PHP/MySQL and Linux

2003-05-27 Thread Chris Payne
wrong as i'm new to unix, sorry :-) Slightly OT, but is it possible to run certain Linux Commands via PHP? I'd like to write a script where I can do CHMOD and CHOWN via a secure web interface rather than having to login via SSH. Thanks everyone, have a great day. Regards Chris

[PHP-DB] Join Cursors

2003-03-24 Thread Chris Berlioz
Does anyone know how to join cursors after having successfull query ie: I have multiple queries that get data from different sources and now I need to join the results, how can I achieve this in PHP (Do I need to write into a temporary table and then requery? is that the only way? I am using MyS

[PHP-DB] ODBC cursor join

2003-03-24 Thread Chris Berlioz
Does anyone know how to join cursors after having successfull query ie: I have multiple queries that get data from different sources and now I need to join the results, how can I achieve this in PHP (Do I need to write into a temporary table and then requery? is that the only way? I am using MyS

[PHP-DB] PHP / Sendmail question

2003-03-15 Thread Chris Payne
1 needs this, which is why i'd rather have it set in the PHp script than in the php.ini or some other way. Sorry if i've confused you LOL. Chris

Re: [PHP-DB] PHP and Sendmail

2003-03-13 Thread Chris Payne
Hi there, I have an SMTP server on here (Imail) - how would I use it with PHP? Any tips to send a quick email as a test? Thank you :-) Chris > You have two options. First option is to get sendmail for windows. > You're going to pay for this, but there is a sendmail replacement fo

[PHP-DB] PHP and Sendmail

2003-03-13 Thread Chris Payne
rewrite my form code it will take weeks LOL :-) Thanks Chris

Re: [PHP-DB] newsletter optimization help needed

2003-03-12 Thread Chris Payne
aight right now :-( Thanks Chris --- while ($row = mysql_fetch_array($sql_result)) { $emailadd = $row["EMail"]; $emailname = $row["emailname"]; $emailphone = $row["emailphone"]; $emailaddress = $row["emailaddress"]; }; > You could change the TO:

[PHP-DB] newsletter optimization help needed

2003-03-12 Thread Chris Payne
the newsletter any faster? I've probably gone about this system the long way, but it works - I just need to find a way to make it faster :-( Thanks everyone All the best Chris --- "; $HT = ""; $subject = "$subject"; $NOTE = "$emailtests"; $NOTE = s

Re: [PHP-DB] Date in a dropbox box

2003-03-10 Thread Chris Payne
Hi there, Thank you John, you are a lifesaver :-) Chris > > I have a form which displays 3 dropdowns, day, month and year, I have > it > > displaying the default of the dropdown for month no problem, but how > can I > > get it to select the current date (day) in the drop

[PHP-DB] Date in a dropbox box

2003-03-10 Thread Chris Payne
important even though it sounds odd :-) so if it was the 5th of a month, it would show 5 as a default value, but allow you to select 1-4 before that and 6-31 after it. Thanks everyone Chris

[PHP-DB] PHP on Mandrake

2003-03-04 Thread Chris Payne
e CGI version of PHP? All the bits i've found online is for mod_php or something? Windows is easier and setup fine but I decided it's time to really get my hands dirty (God help me :-) Thanks everyone. Chris

[PHP-DB] Auto inserting a database with dates

2003-03-01 Thread Chris Payne
). Is there an easy way to write a short PHP script that will populate the field $stock with 3 years dates in advance from the current date, using the format 02-03-200x ? it's either this way or I go through and insert new onces argghhh (That's not a pleasant thought :-) Thanks :-) Chris

Re: [PHP-DB] Storing an array in the database

2003-02-28 Thread Chris Boget
> FYI: Make sure you addslashes() _after_ you serialize your array if it can > contain quotes. Everything else remains the same. Yeah, my bad. Good catch. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Storing an array in the database

2003-02-28 Thread Chris Boget
DimArray = unserialize( $fetchedRecord['field1'] ); $multiDimArray = unserialize( $fetchedRecord['field2'] ); serialize() is your friend when it comes to storing arrays in a DB field. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PHP/SSL and Hosting question

2003-02-27 Thread Chris Payne
nking DSL would be better if I run my actual server from here, any thoughts? Sorry that this is somewhat off topic (But not totally) but everyone on here is very noligable and PHP is the main theme of the server i'll be setting up. Thanks :-) Chris

[PHP-DB] One more date question (NOOOOOOO) :-)

2003-02-26 Thread Chris Payne
I can hardcode the year without a problem. Any ideas how I could do this? Thanks for everything, you are all life savers. Oh and after thinking about it I realized how dumb storing Credit Card details in a DB were :-) Chris

[PHP-DB] If Statement thanks

2003-02-26 Thread Chris Payne
Hi there everyone, Thank you all for your answer - DOH I can't believe I missed something so simple :-) Regards Chris

<    5   6   7   8   9   10   11   12   13   >