Re: [PHP-DB] select query across multiple tables

2004-08-26 Thread jeffrey_n_Dyke
I'm trying to pull all the records from the table class where classID is not equal to the value of classID in the table assignment. Currently, I have 'select class.classID, class.classDesc from class, assignment where assignment.classID = class.classID and assignment.assignmentID=$assidn'.

RE: [PHP-DB] MySQL to EXCEL?

2004-08-17 Thread jeffrey_n_Dyke
I don't know how you have it setup. But you can create a XLS file on the fly using PHP By using header... header(Content-Type: application/vnd.ms-excel); header(Content-Dispostion: attachemnt; filename='Project.xls'); header(Pragma: no-cache); header(Expires: 0); Then just

Re: [PHP-DB] Remote mysql

2004-08-02 Thread jeffrey_n_Dyke
Okay, I am new to PHP but very good with many other scripting languages. I use 'mysql_connect(localhost yada yada' to connect to a database from the domain but I want to put this code on a few sites and have it access one database on the primary domain. How do I write that command? I

Re: [PHP-DB] LAMP

2004-08-02 Thread jeffrey_n_Dyke
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? You should be able to activate all with Fedora and SuSe, from the disks. You may still have to build PHP(on FC?), but IMO you'll want to do that anyway

Re: [PHP-DB] fetch row DISTINCT

2004-07-08 Thread jeffrey_n_Dyke
I'm using PHP with mySQL since a long time. But now I got a question: I need to generate a SQL-Statement to fetch rows with one DISTINCT criteria. To make things clear: I don't want to fetch a single DISTINCT column, I want to fetch the whole row, where one column is DISTINCT. Can

Re: [PHP-DB] Date problem: data is current as of yesterday

2004-07-02 Thread jeffrey_n_Dyke
accidentally replied only to karen. The database queries all the sources at night after everyone has gone home. That means the data was current as of yesterday. This little snippet below returns yesterday's date, except that the first day of the month returns 0 for the day. Now, I know why

[PHP-DB] [slightly OT] OOP syntax

2004-06-30 Thread jeffrey_n_Dyke
I have some procedural code that i'm wanting to convert into classes(and i'm a bit greeen to OOP), hopefully to offer them to the PHP community. I keep all my config data in arrays of arrays, which i'd like to keep when i move to a class model, but can't seem to find out the correct defintion

Re: [PHP-DB] [slightly OT] OOP syntax

2004-06-30 Thread jeffrey_n_Dyke
On Wed, 30 Jun 2004 14:20:52 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have some procedural code that i'm wanting to convert into classes(and i'm a bit greeen to OOP), hopefully to offer them to the PHP community. I keep all my config data in arrays of arrays, which i'd like to

Re: [PHP-DB] addslashes replacement?

2004-06-30 Thread jeffrey_n_Dyke
I'm using php addslashes to store data into MySQL and php stripslashes when pulling it back out, but I'm running into trouble when people enter HTML code. Do you have any recommendations? Here's an example of what I'm talking about: input name=Title value=?php echo

Re: [PHP-DB] Date Select

2004-06-25 Thread jeffrey_n_Dyke
How can I query a MySQL table to get the latest results from a date field? Basically, I am inserting several records at a time at the end of each week. I want to have a page that displays the results for the last week only. The date format in the field is -MM-DD if you want the latest row

Re: [PHP-DB] PHP with Javascript tutorials?

2004-06-25 Thread jeffrey_n_Dyke
Hi there everyone, Hello. 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

Re: [PHP-DB] value error in PHP form

2004-06-21 Thread jeffrey_n_Dyke
Hi. You left out the 'php' after the '?'. So it should read: Actually this is most likely a register_globals issue. try. $_GET['action'] or $_POST['action']. you'll only need to use ?php if short_tags = off in your php.ini. HTH Jeff ?php print $action; print $Name; ? See if that helps

Re: [PHP-DB] Linux/PHP/Access Database - oh boy :(

2004-05-12 Thread jeffrey_n_Dyke
Hello all, Am I right in thinking I have very few options? I don't want to move over to ASP (would that even help?) because it means learning VBScript and I don't have a lot of time. Also, I can't use another database (e.g. MySQL) cos the server admin is NOT helping me and won't install

Re: [PHP-DB] no temp var for mysql_fetch_array results

2004-05-12 Thread jeffrey_n_Dyke
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 4... Now this makes some sense; the manual says that mysql_result ( resource result , int row ) will jump to row $row in the output but says nothing about returning me a given fields. Any other thoughts? Hey

Re: [PHP-DB] no temp var for mysql_fetch_array results

2004-05-11 Thread jeffrey_n_Dyke
Hi, all -- I have some code which looks about like if ( $_POST['signup']['referrer'] ) # a friend? { $q = select InvitedBy from customer where EMail = '{$_POST['signup']['referrer']}' ; $r = mysql_query($q,$dbro) ; $row = mysql_fetch_array($r) ; $i =

Re: [PHP-DB] Need some HELP (not works)

2004-05-10 Thread jeffrey_n_Dyke
Thanks pepole. I've tried but still does not work. when I put the varaibles name between ' ' I found this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'. I typed in this way print INPUT TYPE='hidden' NAME='User_name' VALUE='$_POST[UserName]';

Re: [PHP-DB] Edit with notepad

2004-05-10 Thread jeffrey_n_Dyke
hi, header(Content-type: application/vnd-ms.word); is not what my customers want. They may or may not want to save it in their harddisk.. but having the header at the beginning of my page will force them to save it in their harddisk. Some of the customers just want to view it on the web while

Re: [PHP-DB] Problem with update-command

2004-04-22 Thread jeffrey_n_Dyke
$result=mysql_db_query(usr_172_1,UPDATE artikel SET Preis='\$preis\' WHERE ID='\$id\'); //mysql_error($result); Here you're escaping the $ and then the ', have you tried $result=mysql_db_query(usr_172_1,UPDATE artikel SET Preis='{$preis}' WHERE ID='{$id}'); with those escapes this is the

Re: [PHP-DB] Graphing - bar charts

2004-04-06 Thread jeffrey_n_Dyke
Hi there: Hello, I am looking for an open source and simple PHP script that will graph (bar) a few MySQL fields. Does anyone have any recommendations? I'd suggest the jpgraph OO lib. Very easy to get simple graphs up and running. so long as you have gd/jpeg available to your php. With

Re: [PHP-DB] Re: Recursive photo gallery removal problem.

2004-03-26 Thread jeffrey_n_Dyke
No solutions or feedback? :( -Tom Reed [EMAIL PROTECTED] _ How do you select _all_ the images from Folder B? Can you show that statement? In every delete you're able to do against a database table, you should first be able to run a select and basically replace

RE: [PHP-DB] exporting data to excel

2004-03-25 Thread jeffrey_n_Dyke
Do you set the content-type in the response header like in JSP and servlets? I've been reading the PHP Manual; where do you find stuff like this? take a look at the header function http://php.net/header an example...ymmv header(Content-type: application/vnd.ms-excel);

Re: [PHP-DB] Strange problem with mySQL

2004-03-25 Thread jeffrey_n_Dyke
I am trying to update a database that I use to store user names and the hashed values of passwords. The database name is Login, the table is users. I have the following commands in my php file. @ $db=mysql_pconnect('localhost','apache','password'); mysql_select_db('Login');

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread jeffrey_n_Dyke
I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT NULL default 'cl', `promotion` char(1) default 'n', `bestSeller` char(1) default 'n', `newArrival` char(1) default 'n', `size`

Re: [PHP-DB] tick mark `

2004-03-22 Thread jeffrey_n_Dyke
Why is it when I have this ` tick mark in my query it works fine, but when I remove them it I get an error? ___ This tells to mysql to NOT treat the word as the reserved word that it _may_ be, but use it literally. and interval, i believe, is a reserved word. It is much like escaping

Re: [PHP-DB] Processing a fetched external page

2004-03-18 Thread jeffrey_n_Dyke
I'm working on a project that takes the content of a URL and does stuff with the content. I've managed to extract the target url's html, and am using str_replace to fix links, stylesheets etc. However, i'm stumped when it comes to processing the text content. Would anyone know how to isolate

Re: [PHP-DB] javascript question

2004-03-08 Thread jeffrey_n_Dyke
Gamze Baaran

Re: [PHP-DB] No data being put into the DB

2004-03-03 Thread jeffrey_n_Dyke
On Thursday 04 March 2004 08:08, Rich Hutchins wrote: Oh, and, normally, you reference the variables like so: $_POST[varname]. I typically use the following syntax: INSERT INTO tablename VALUES('.$_POST[varone].','.$_POST[vartwo].'); IMO it is better to use the braces syntax: insert into

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread jeffrey_n_Dyke
An interesting thought. I tried this: echo Term: $search, Returns: $arrayword, UserIP: $ipbr; $logit = mysql_query(INSERT INTO log SET term='$search', returns='$arrayword', time=CURTIME(), date=CURDATE(), ip='$ip'); echo Query Value: $logit; And got this on the page: Term: skater, Returns:

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread jeffrey_n_Dyke
Ok guys, I found the problem. It's actually something I've run into before. If you take a look at the query you'll notice that one of the fields is named returns. When I created the test table with phpMyAdmin it created it and everything seemed fine. Then I decided to try something. I tweaked

Re: [PHP-DB] Strange DB Error

2004-02-25 Thread jeffrey_n_Dyke
When returning to the main page of my script sometimes I'll get the following error: Warning: mysql_fetch_array(): 8 is not a valid MySQL result resource in /home/nick/http/search/includes/main.inc on line 13 This happens only AFTER the first element in the resource has been processed.

Re: [PHP-DB] Strange DB Error

2004-02-25 Thread jeffrey_n_Dyke

Re: [PHP-DB] PHP export to CSV

2003-12-22 Thread jeffrey_n_Dyke
using mysql as an example, this is what i do. ---UNTESTED CODE -- $sql = SELECT * FROM TABLE; $res = mysql_query($sql) or die(mysql_error() . br.$sql); $fp = fopen(file_to_create.csv, w); while ($rs = mysql_fetch_row($res)) { $write_string = \ . implode(\,\, $rs) . \ \n; fwrite($fp,

Re: [PHP-DB] Get Names of columns of a table

2003-12-17 Thread jeffrey_n_Dyke
http://www.php.net/mysq_list_fields hth Jeff Shaun

Re: [PHP-DB] MySQL: getting latest record

2003-12-14 Thread jeffrey_n_Dyke
you've just about got it in your question. SELECT * FROM MyTable WHERE Field1='test' OR Field2='test2' ORDER BY TIMSTAMP DESC LIMIT 1 hth Jeff

Re: [PHP-DB] PHP - RH Linux - Interbase

2003-12-06 Thread jeffrey_n_Dyke
Hey Todd. I'm no guru...but have some familarity with these packages. i think you could remove the php rpm with rpm --erase php* and then recompile. being from other OS's myself, mainly solaris, i find it easier to build my own, mainly b/c i know when it works and when it does not.(still a RH

Re: [PHP-DB] Uploading files

2003-12-02 Thread jeffrey_n_Dyke
the web process does not have access to write the directory that oyu're moving the file to. in this case ./images/exec/. most likely you'll need to either chmod o+w ./images/exec (give the world the write right) or change the owner of that directoyr to be the web process. both come with their

Re: [PHP-DB] send email

2003-11-25 Thread jeffrey_n_Dyke
www.php.net/mail redhat

Re: [PHP-DB] Linux/PHP with M$/SQL Server

2003-11-20 Thread jeffrey_n_Dyke
you can use freetds (http://freetds.org) i think there is even an rpm... Then you just use the mssql_* functions built into php hth Jeff

Re: [PHP-DB] how obtain last id past insert?

2003-11-20 Thread jeffrey_n_Dyke
if you're using mysql php.net/mysql_insert_id if you're not, there may be a variant for you db hth Jeff Webmaster

Re: [PHP-DB] informix error

2003-11-19 Thread jeffrey_n_Dyke
this is usually based on what your passing this function. it can be a result of a bad query or just a bad variable. do you have the correct variable that is holding a result of an ifx_query() call. if you could post the prior lines of this that would probably make it clearer. also try

[PHP-DB] Paradox tables

2003-11-11 Thread jeffrey_n_Dyke
if you can connect via odbc, you can use php with it. i just googled - paradox, database, php and the first link will answer your question. ps. Rosen your email bouncesunknown user. error -- 550 5.1.1 [EMAIL PROTECTED]... User unknown hth jeff - Forwarded by Jeffrey N Dyke/CORP/Keane

Re: [PHP-DB] form not working...

2003-11-10 Thread jeffrey_n_Dyke
i'd be curious what your actual problem is? here's a question though.,...would these ever work?. snip if ((!isset($_POST['edit'])) or ($_POST = )) { $_SESSION['table'] = t_items; call_user_func(db_retrieve); } elseif ((isset($_POST['edit'])) or (!$_POST = )) { /snip You're basically

Re: [PHP-DB] dynamic graph on web site

2003-11-10 Thread jeffrey_n_Dyke
jpgraph does a fantastic job of this, and is very easy to use. I highly reccomend it!! http://www.aditus.nu/jpgraph/. hth Jeff

Re: [PHP-DB] number_format problem

2003-11-05 Thread jeffrey_n_Dyke
could you cast as a float/double before inserting? $number = (double) $string; don't know what would happen to the comma, but i assume it would just get removed?? just a guess/thought Jeff

Re: [PHP-DB] number_format problem

2003-11-05 Thread jeffrey_n_Dyke
sweet. thanks for hte correction. i try, sometimes i fail. :) CPT John W.

Re: [PHP-DB] RE: [PHP] Re: Adding a log file

2003-11-05 Thread jeffrey_n_Dyke
if you want actual errors that PHP generates and not logic based errors, then writing your own error handling function and calling it with set_error_handler() at the top of your scripts may work for you. in your function you'd just need to use $errorstr, $errorfile and $errline and log it using

Re: [PHP-DB] Re: Page counter from a query ?

2003-11-04 Thread jeffrey_n_Dyke
question/comment... i don't use PEAR currently. but i noticed this class expects register_globals=on and would therefore not to work on my system. Or does another parent class take care of the translation between $form and $_GET['form']? Jeff

RE: [PHP-DB] Re: Page counter from a query ?

2003-11-04 Thread jeffrey_n_Dyke
not to belabour this topicbut, that i know. i was just curious as to why that class is written like that still? it seems that if PEAR does this for you(extract), that _may_ be a security concern for those that are not being security concious. Not that i'm saying, or know, that PEAR does

Re: [PHP-DB] phpmyadmin screwup

2003-11-04 Thread jeffrey_n_Dyke
this should fix ya.. http://www.mysql.com/doc/en/Resetting_permissions.html hth Jeff Joffrey Leevy

Re: [PHP-DB] Apache 2

2003-11-03 Thread jeffrey_n_Dyke
lots of people seem to post/think different things, but each time Rasmus posts to these lists, he says PHP/Apache2 is not a production ready combo. if you search the PHP-INSTALL archives for his name or Apache2, you'll find his posts. hth Jeff -- PHP Database Mailing List

Re: [PHP-DB] Apache 2

2003-11-03 Thread jeffrey_n_Dyke
'tested' is the key. hopefully you don't test in production ;-) his point has been that you may not notice the problems until the servers get under heavy load. i've got two such setups running myself. but not in production. jeff

Re: [PHP-DB] removing space ?

2003-10-28 Thread jeffrey_n_Dyke
there are trim functions in both mysql and php. both they are called the same...trim, ltrim and rtrim. trim takes off both sides, and the r and l take the right and left respectively, but yes, this is possible in the query. http://www.mysql.com/doc/en/String_functions.html php.net/trim

Re: [PHP-DB] removing space ?

2003-10-28 Thread jeffrey_n_Dyke
ahh, yes...but you didn't say mysql...sorrythey all have this function. [EMAIL PROTECTED]

Re: [PHP-DB] txt to db, file() bug? - solved err..worked around

2003-10-24 Thread jeffrey_n_Dyke
The crux of the problem seemed to be that i was ftp'ing files down from remote servers(1 to 4 depending how many are currently active), saving them locally and then parsing those files in the same script. When i removed the ftp process from the code and broke the process out into two seperate

[PHP-DB] txt to db, file() bug?

2003-10-23 Thread jeffrey_n_Dyke
OS Solaris8 php4.3.2 and php 4.2.3. running as CLI from cron and command line. I have a log file that i'm processing that i need to in turn insert only certian fields into the database. I open the files using file(filename.csv),which returns the array for me to process. i process all the lines

Re: [PHP-DB] Can't copy file to another server

2003-10-23 Thread jeffrey_n_Dyke
do you just need a / $AcceptedFolder= 'F:/'; Karen Resplendo

Re: [PHP-DB] Re: txt to db, file() bug?

2003-10-23 Thread jeffrey_n_Dyke
hmmm. thanks for this. the file actually does not have quoted entries between the commas. it is just: text,text,text . ,text \n that does not take away from the assitance...gives me more things to think about. thank you. jeff

Re: [PHP-DB] How do I get quotes around strings to display?

2003-10-21 Thread jeffrey_n_Dyke
$fieldarray = array(one,Two, three, four); $line = \.implode(\,\,$fieldarray) .\; this will print out one,Two,three,four hth jeff

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

2003-10-20 Thread jeffrey_n_Dyke
$qry = SELECT id, name FROM a_table; $result = mysql_query($qry) or die(mysql_error()); while ($rs = mysql_fetch_row($result)) { $myarray[$rs[0]] = $rs[1]; } is that waht you need? hth Jeff

Re: [PHP-DB] php and MySQL and PostgresSQL at the same time

2003-10-02 Thread jeffrey_n_Dyke
I use Apache with PHP using MSSQL and MySQL at the same time... You'd just need to connect to different databases, the platform should not matter. hth Jeff

[PHP-DB] stripping carrige returns with SQL

2003-09-26 Thread jeffrey_n_Dyke
I have a query that is pulling user comments, supplied by via web internface and creating a text file out of them. In these comments are all sorts of carrige returns. I've tried stripping them out with the following queries, but once imported into excel, the carrige returns are still there. so

[PHP-DB] sql optimizing assistance

2003-09-19 Thread jeffrey_n_Dyke
I have two tables and am running a simple join between them to get questions and their repsective response averages from a survey. The question table has 49 rows and the Response table has 126,732. I'd like to cut down on the time its taking to run this specific query...as i'll be running many

Re: [PHP-DB] sql optimizing assistance

2003-09-19 Thread jeffrey_n_Dyke
i new i forgot to include something. here this is the ouput. it looks like its using none of my indexes in the Response, which is where i would think it would need it the most. +++---++-++++ | table | type | possible_keys |

Re: [PHP-DB] sql optimizing assistance

2003-09-19 Thread jeffrey_n_Dyke
Thanks Jeff! You were correct the Question_Key was set second in the Primary key...i changed that and the query went down to 2.41seconds. very nice. Thanks for the help. Jeff ps. you're also correct about the LIKE, of course...that was being used horribly. i'd forgoten it changed to an INT,

Re: [PHP-DB] JOIN across db's in MySQL

2003-09-18 Thread jeffrey_n_Dyke
i asked this same question once and somehwere in the archives is a post by John Holmes that shows an example of how mysql allows db joins. its from last month i believe http://marc.theaimsgroup.com/?l=php-db but in short, mysql does support this using . db.table.field hth Jeff

Re: [PHP-DB] Whios request record in database

2003-09-12 Thread jeffrey_n_Dyke
couple possible problems. 1. register globals being off and you're using variables like $name instead of $_POST['name']. 2. you're not asking that anything be written to the database, only selecting $insert=select * from $table; $db_query=mysql_db_query($db_name,$insert); 3.

Re: [PHP-DB] MYSQL Table Dump

2003-09-10 Thread jeffrey_n_Dyke
http://www.mysql.com/doc/en/mysqldump.html John Ryan

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

2003-09-09 Thread jeffrey_n_Dyke
you could first check for isset($_POST['keyword']) and then if that passes check what keywords you have. or you could write an additional html tag to the page like. input type=hidden name=keyword[] value=NA. This would force the $_POST['keyword'] array to exist and then you'd have to strip

Re: [PHP-DB] foreach() db brainiacs please help?

2003-09-09 Thread jeffrey_n_Dyke
couldn't this be accomplished with a Left Join? Depending on how your tables are arranged you should be able to get all (sub)sub-names out and in the same result set using the top_name with a Left Join. any key that relates to the parent key would be returned. it looks like you have them all in

RE: [PHP-DB] 2 problems

2003-09-08 Thread jeffrey_n_Dyke
the value will be what ever you set the value to be in your html tag. intput type=checkbox name=color value=red if checked $_POST['color'] will equal red. if unchecked, the index 'color' will not be in the $_POST array. hth Jeff

Re: [PHP-DB] Modify MySQL Record

2003-09-05 Thread jeffrey_n_Dyke
looks like you stopped putting commas after your fields at $field_str .= formation = '$formation' ; $field_str .= perfs = '$perfs' ; $field_str .= event = '$event' ; $field_str .= fluid = '$fluid' ; hth Jeff

Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread jeffrey_n_Dyke
I'd worry about the empty dates after. and use something like. $qry = select date1, date2 from table; $result = mysql_query($qry) or die(mysql_error()); while ($rs = mysql_fetch_row($result)) { //this array could be built a number of ways, one is $bookdate[] = array($rs[0],$rs[1]); } if

Re: [PHP-DB] Database backup

2003-08-27 Thread jeffrey_n_Dyke
use mysqldump. you can dump all databases (--all-databases) or list them individually. http://www.mysql.com/doc/en/mysqldump.html hth Jeff

RE: [PHP-DB] Logic Help...

2003-08-27 Thread jeffrey_n_Dyke
if its never entering hte test process maybe you're not holding what you think you are in the arrays. each time through the loop, before the if statemetn, just add a print_r($shell[$cntr]) and/or print_r($grp[$cntr] == ). for that matter you could print_r both arrays so you can see exactly what

Re: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread jeffrey_n_Dyke
if you're using php to generate this query you could use addslashes() to the piece that is holding 11301201 0603A HKA 3902 #3708_JD's AE Exp. this will escape the slashes making them \' similarly if you're getting \' in your return values you can use stripslashes() www.php.net/addslashes

Re: [PHP-DB] Simple Referrer

2003-08-27 Thread jeffrey_n_Dyke
$_SERVER['HTTP_REFERER'] hth jeff Diana Cassady

Re: [PHP-DB] join across databases - how to select databases?

2003-08-22 Thread jeffrey_n_Dyke
to my knowledge this is not possible in MySQL. There are only joins at the table level. I've been curious about this in the past myself, so if i'm incorrect, i'm hoping to hear it via this post. hth jeff

Re: [PHP-DB] Failure to interact with MySQL in Redhat 9 ?

2003-08-22 Thread jeffrey_n_Dyke
do you get anything helpful if you set error_reporting(E_ALL) and rerun the search. could this be a register_globals issue? can you print_r($_GET) or print_r($_POST) depending on how you have defined the FORM action...and if you can is there anything in those arrays? hth Jeff

RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...?

2003-08-20 Thread jeffrey_n_Dyke
if you're looking for a little more control over your documents, i'd try this class. Its based on the WriteExcel Perl Module. Perl class docs can be found here---http://search.cpan.org/author/JMCNAMARA/Spreadsheet-WriteExcel-0.41/WriteExcel.pm. I've found _very_ few things for my needs that

Re: [PHP-DB] Help with filling a second drop down List from a prior listselection in the same page

2003-08-18 Thread jeffrey_n_Dyke
Sounds like you're on the right track. in the select list, add -- onChange=document.form.submit() -- this will submit the form when the user selected the an option from the list, then you could catch the submitted variable and pass it to the second drop down list and third and so on. Realizing

RE: [PHP-DB] array issue

2003-08-17 Thread jeffrey_n_Dyke
This may or may not make sense for your issue. but if you have the whole array in memory you can serialize() it and write the string that the function returns to the file. $fp = fopen(yourfilename.txt, w); $my_array_s = serialize($my_array); if (isset($fp)) { fwrite($fp, $my_array_s); }

Re: [PHP-DB] Breaking down a table field....

2003-08-14 Thread jeffrey_n_Dyke
SELECT DISTINCT(Unit) from TABLE_NAME; [EMAIL PROTECTED]

Re: [PHP-DB] Re: PHP MSSQL

2003-08-14 Thread jeffrey_n_Dyke
personally, i had luck with the statement below, but have sent it to others in the past and they had varying results. but give this a shot at the top of your page that your PHP code is running on. mssql_query(set textsize 65536); hth Jeff

Re: [PHP-DB] MySQL Returns Error

2003-08-14 Thread jeffrey_n_Dyke
if i understand your question. why not take a different approach. when the form is submitted do your updates/inserts and then forward the page with the header() function to another page, even if it is the same page, but with a different set of variables set on the page, the idea being to remove

Re: [PHP-DB] Help needed with variable scoping? or mysql problem

2003-08-14 Thread jeffrey_n_Dyke
best way to tell is to place .'or die(mysql_error())' after any call to mysql_query() to see what mysql is complaining about. personally I sometimes declare the query first so i can echo that as well after the msyql_error() function, so i can see the query that has just been excecuted.

Re: [PHP-DB] ODBC Database

2003-08-14 Thread jeffrey_n_Dyke
whoops, meant to include thishttp://www.mysql.com/downloads/api-myodbc-3.51.html [EMAIL PROTECTED]

Re: [PHP-DB] Calculated field in MySQL

2003-08-10 Thread jeffrey_n_Dyke
one thinglooks like you need one more outer set of paren's to tie both sets of the equation together. query = SELECT *, ((Year(Now()) - Year(BDAY)) + ((DAYOFYEAR(Now()) -DAYOFYEAR(BDAY))/365)) as AGE FROM Katalog WHERE AGE = 31 AND AGE = 50 AND IS_MEM_EXP = 0 AND IS_OPEN = 1 ORDER BY

Re: [PHP-DB] Breaking down a table field....

2003-08-07 Thread jeffrey_n_Dyke
yep, sure is. SELECT DISTINCT(Unit), Count(Unit) from TABLE GROUP BY Unit hth jd [EMAIL PROTECTED]

Re: [PHP-DB] Text output from Mysql

2003-08-01 Thread jeffrey_n_Dyke
if there are line feeds in the text, you can use the function nl2br($text); www.php.net/nl2br if you require more, you may have to add logic. around headers/titles etc... hth jeff

Re: [PHP-DB] Problem with $_SERVER['HTTP_REFERER']

2003-07-28 Thread jeffrey_n_Dyke
is it possible that there is no referer. what happens if you link to this page from another, ensuring there is a referer, will it display it then? Jeff

Re: [PHP-DB] MySQL Date insert

2003-07-28 Thread jeffrey_n_Dyke
i have a feeling oyu're not getting a mysql error but a PHP error??? you have an odd number of parentheses and mysql_error will not have an closing paren. if that is the case, try this mysql_query(INSERT INTO Boats (Make, Model, Serial,Stock, Extension, Cust_Name, Store, Date) VALUES

RE: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread jeffrey_n_Dyke
this may work, but i hesitate, i've _never_ had to use exit to get my code to excecute a redirect. and i'm heavily reliant on this function. did aarons fix work for you? i think you're problem lies elsewhere. as i've just mocked the same thing on my server, but using 10 instead of 03...i'm on

Re: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread jeffrey_n_Dyke
that why i love this list. thanks John W. Holmes

RE: [PHP-DB] Query problem

2003-07-22 Thread jeffrey_n_Dyke
you can't use COL_NAME = NULL or COL_NAME = 'NULL' and get the desired results , you have to check for IS NULL/ IS NOT NULLSo, change the query to SELECT * FROM TABLE WHERE MY_FIELD IS NULL or, SELECT * FROM TABLE WHERE MY_FIELD IS NOT NULL From my understanding when you check for

Re: [PHP-DB] Inserting a large number of rows into mySQL

2003-07-18 Thread jeffrey_n_Dyke
If you have the standard table type installed As you loop though though the arrays in PHP get ahold of the last ID inserted via mysql_insert_id() and add it to an $inserted_array variable and then at each insert check that the last insert was successful, and if not send your db a bunch of

Re: [PHP-DB] PHP MySQL news display probs

2003-07-15 Thread jeffrey_n_Dyke
you'll need to use $_GET['id'] or you'll need to set register_globals = On. I would use the first method, and replace $query = SELECT slug, content, contact, timestamp FROM news WHERE id = '$id'; with -- $query = SELECT slug, content, contact, timestamp FROM news WHERE id = '. $_GET['id'].'; i

Re: [PHP-DB] date, and time?

2003-07-10 Thread jeffrey_n_Dyke
you could change mysql to a few different date formats, but i don't _think_ that is one of them. Why not just take care of a format change on the way out with DATE_FORMAT. Also, if you store the date as one of the defualt date[time] values then you have tons of functions that you can run against

Re: [PHP-DB] mysql_fetch_array issues.

2003-07-09 Thread jeffrey_n_Dyke
Do you have an 'or die(mysql_error())' statement following your mysql_query($result) line. 99% of the time, this error means your query failed. if it works on another serverare the fields the same, the dbname, the tablename? hth jeff

Re: [PHP-DB] csv upload script?

2003-07-07 Thread jeffrey_n_Dyke
if it is truley csv, then use MYSQL's LOAD DATA INFILE syntax. granted you've got to have ahold of the text file.its not out of the box, but pretty close. Woudl that work for you? http://www.mysql.com/doc/en/LOAD_DATA.html hth Jeff

Re: [PHP-DB] insert NULL to mysql table.

2003-07-02 Thread jeffrey_n_Dyke
how about \0. yours is a foward slash not an escape. though that may just be your post you can also use an unquoted NULL. hth jeff

  1   2   >