[PHP-DB] Mssql/Sybase errors

2002-04-25 Thread Jeffrey_N_Dyke
Hello. I have recently installed the freetds package and reconfigured PHP to connect to MSSQL. I am running a simple join query on two tables and I get the following error. bWarning/b: Sybase error: 'REQ' is not a recognized OPTIMIZER LOCK HINTS option. (severity 15) in myFile.php on line

Re: [PHP-DB] Mssql/Sybase errors

2002-04-26 Thread Jeffrey_N_Dyke
No thats not it. I connected above this line. All of my errors come as Sybase errors because of the install of freeteds used with the --with-sybase=/path/to/freetds flag when i configure. It actually ended up being a spacing problem where i had concatenated the query string. there were two

Re: [PHP-DB] email

2002-05-07 Thread Jeffrey_N_Dyke
everything you need to know. http://www.php.net/manual/en/ref.mail.php Hope this helps jeff Natividad

[PHP-DB] tables/columns with spaces

2002-05-10 Thread Jeffrey_N_Dyke
Someone, in their infinite wisdom, named some, not all of course, tables and columns with spaces, i.e. BUSINESS AREA in a SQL server database that i am working with. You can run lots of queries that return fine, but when I run a query such as select * from REQ where BUSINESS AREA = '$var', i

RE: [PHP-DB] tables/columns with spaces

2002-05-10 Thread Jeffrey_N_Dyke
Don't i agree! I didn't create this database. and I don't use spaces for anything. that is always good pracice, but since these folks had...here is what i found. The [ ] notation, works fine on tables, i.e. [BUSINESS AREA] but when you have a column with a space then use this notation

Re: [PHP-DB] Re: ?!? wats wrong?

2002-05-14 Thread Jeffrey_N_Dyke
I love how this keeps getting answeredwere is just spelled wrong. it's so funny that we all miss that though. i did a couple days ago and responded with my own solution that didn't matter, b/c i still didn't spell where correctly. :)

[PHP-DB] not a problem per se, just a curiosity.

2002-06-05 Thread Jeffrey_N_Dyke
I have have developed a statistics package that tracks user info(browser, os, colors, heights, widths etc) as well as where and when they use my various sites. in the tables there are about 40 hits of aproximately 7,000 that the broswer entry is PHP/2.0 and PHP/1.2 only. Normally an entry looks

Re: [PHP-DB] a (my)sql sort

2002-06-06 Thread Jeffrey_N_Dyke
ok, i have a query that is like so select distinct(id), MIN(time), MAX(time), count(page), ip, (UNIX_TIMESTAMP(MAX(time)) - UNIX_TIMESTAMP(MIN(time))) from trainingHit group by id and i really want to sort on the time difference, but i get an error that states invalid use of group function

RE: [PHP-DB] Executing Queries from a File Using PHP

2002-06-13 Thread Jeffrey_N_Dyke
all you have to do is put one query per line in the file, it may be hard to read, but who cares. and then it is as simple as. $contents = file(sql.txt); //file function reads file into array while (list ($qry)) = each($contents)) { mysql_query($qry); } Just a thought Jeff

RE: [PHP-DB] Executing Queries from a File Using PHP

2002-06-13 Thread Jeffrey_N_Dyke
although this goes without saying but in my petty need for completion, i feel i must writethere is obviously SO much more that can be done where i put the mysql_query($qry), whether it be updating, inserting, selecting etc... but that can be a starting point. i feel better, thank you for

Re: [PHP-DB] execute external sql script in php

2002-06-18 Thread Jeffrey_N_Dyke
is this from within the browser? if so, you'd need to open the file, read the contents and execute the script. I don't knwo what 'source' does. but i don't claim to know much either. i may not have heard of this. if you just want to do it from a command line then you use a after your login

[PHP-DB] date issue with MsSql

2002-07-02 Thread Jeffrey_N_Dyke
I'm posting info into a SQL Server from a form, all has been working fine inserting, updating and selecting information for months. I have recently added a date field to the table with the type of datetime. It updates the table in SQL Server fine, but it keeps pulling it back as this date [Feb

[PHP-DB] date issue with MsSql - follow up....still a bug?

2002-07-03 Thread Jeffrey_N_Dyke
Hello. I was curious if any one is using PHP4.2x with SQLserver 7(or 2000) and having luck with the datetime type. No matter the datetime in the database PHP 4.1.2 is always returning Feb 06 2036 6:37AM . The insert is correct, its only the select that this happens on. There was a bug report,

Re: [PHP-DB] cookies multiple pages

2002-07-03 Thread Jeffrey_N_Dyke
Is this a issue with register _globals = off. try referencing it with $_COOKIE['user_data']. Also isn't 3600 only an hour. 60secs * 60mins? i think 6 weeks would be... 151200 60 * 60 * 42days does that work? Jeff

Re: [PHP-DB] How to use Full text search?

2002-07-18 Thread Jeffrey_N_Dyke
I break up the search words using a function and then build a query based on the search criteria. If it is multiple words, I use REGEXP for the search.( I use a mysql database). then when there are multiple searches you can format the query string like SELECT show_name FROM table_of_shows

Re: [PHP-DB] Connect to MySql DB on diferent domain

2002-07-25 Thread Jeffrey_N_Dyke
instead up supplying 'localhost' in your mysql_connect() function just use the full name of the server i.e mysql_connect(www.domain.com $user, $pass) you must ensure the port is open through the firewall, if applicable, and that you have a user set up with that can access it from another

[PHP-DB] mssql datetime field

2002-07-25 Thread Jeffrey_N_Dyke
has anyone had any expierence with the datetime field coming back from MSSQL as someting along the lines of February 3, 2036 6:36AM. This happens to me no matter the time in the database. PHP inserts it correctly, but the select has a problem. I am using php4.1.2 and SqlServer 7.0. Or is

Re: [PHP-DB] Supplied argument is not a valid MySQL result resource

2002-08-09 Thread Jeffrey_N_Dyke
add an... or die(mysql_error()) to the $resultm = mysql_query($sqlm); statement and you'll have a lot more info for yourself, and the list if you still need assistance.

Re: [PHP-DB] Re: securing directory tree and allowing PHP to work

2002-08-20 Thread Jeffrey_N_Dyke
If you are running Apache and have access to the httpd.conf file. Comment out AddModule mod_autoindex.c and restart apache. if you like this for some of your directories, then I'd follow Jason's advice. If you are using IIS or another server, I'm sure the same option is available, but I'm

Re: [PHP-DB] SQL update help

2002-09-20 Thread Jeffrey_N_Dyke
if you put quotes around the variable $PHP_SELF it should work...try this. UPDATE $table SET pages = '.$PHP_SELF.' WHERE session = $holy_cow hth jd Jas

Re: [PHP-DB] Confused

2002-09-23 Thread Jeffrey_N_Dyke
if i'm reading right, you could use a join to get all of that info. select users.group_id, user_id, user_name, groups.group_name from users inner join groups on (groups.group_id = users.group_id) group by users.group_id parens not needed, it just makes it more legible. that should give you an

[PHP-DB] enum and bad planning

2002-10-01 Thread Jeffrey_N_Dyke
I have five enum fields, all Y/N. There is now(last minute) a requirment to report on all clients that said Y to more then one of the questions(its a survey). Had i known about this requirement, i could have made them BIT and had a simple 1/0 option and summed the fields to check the total

Re: [PHP-DB] Multiple select

2002-10-01 Thread Jeffrey_N_Dyke
use select name = 'listbox1[]' multiple this will send an array to your script. |---| | Jeff | KeaneIT - Presidents | | Landing | Suite: 200 | |Outside: 617 -517-1772 | | | E-mail: [EMAIL PROTECTED] | |[ Mailing: 10 Presidents | |

RE: [PHP-DB] enum and bad planning

2002-10-01 Thread Jeffrey_N_Dyke
Thanks for the responses. I got one earlier that did the trick. I wanted to try as hard as i could from altering the table, as i was already using the Y value in other reports...and here is a great solution. this may help someone else. so I wanted to post it. I'll use it again, i'm sure

Re: [PHP-DB] Query error

2002-10-02 Thread Jeffrey_N_Dyke
if you are using mysql, it doesn't support the sub-select. Wilmar Perez

Re: [PHP-DB] deleting a file

2002-10-03 Thread Jeffrey_N_Dyke
unlink() |---| | Jeff | KeaneIT - Presidents | | Landing | Suite: 200 | |Outside: 617 -517-1772 | | | E-mail: [EMAIL PROTECTED] | |[ Mailing: 10 Presidents | | Landing Medford, MA 02155 USA| | ] |

Re: [PHP-DB] Table question....

2002-10-03 Thread Jeffrey_N_Dyke
if you mean the rows switching colors i use this. in this example i'm getting data from mysql $rs = 0; for($i = 0; $i count($rs); ) { while ($rs = mysql_fetch_array($result)) { $bgcolor = ($i % 2) ? 'blue' : 'black'; //do stuff $i++; } } then $bgcolor goes

Re: [PHP-DB] Form Handler

2002-10-03 Thread Jeffrey_N_Dyke
register_globals=off in your php.ini turn it on, or use $_POST['FName'] |-| | Jeff | KeaneIT - Presidents Landing | | | Suite: 200| | Outside: 617 -517-1772 | E-mail: | | [EMAIL PROTECTED]| | [ Mailing: 10

RE: [PHP-DB] Advanced search scripts

2002-10-09 Thread Jeffrey_N_Dyke
For what its worth. I wrote to the MySql folks asking about a production release date and the reply was that they consider the latest in Beta, and according to them, that is 'production ready' as it has gone through adn passed all their rigorous testing. Have I upgraded yet? No. But, I've

Re: [PHP-DB] Fatal error: Call to undefined function: mysql_connect() ......

2002-10-14 Thread Jeffrey_N_Dyke
does the mysql section show up in phpinfo() ? is [shared] allowed in that configure argument? |-| | Jeff | KeaneIT - Presidents Landing | | | Suite: 200| | Outside: 617 -517-1772 | E-mail: | | [EMAIL PROTECTED]

RE: [PHP-DB] Fatal error: Call to undefined function: mysql_conne ct() ......

2002-10-14 Thread Jeffrey_N_Dyke
I think this is how it works.if you're using dbx then you need to connect using dbx_connect and not mysql_connect and i don't think that [shared] is a valid argument. I only connect to mysql and M$Sql so i have configured to connect to those specifiacally. I would reconfigure using

RE: [PHP-DB] mssql select db problem

2002-10-14 Thread Jeffrey_N_Dyke
i'd get rid of the space as well, or use brackets around the db name to account for the space. John W. Holmes

RE: [PHP-DB] mssql select db problem

2002-10-14 Thread Jeffrey_N_Dyke
sorry i mis spoke, the brackets will help you in queries with tables and columns that have spaces, not in the connect with actual dbs(at least i don't think so). - Forwarded by Jeffrey N Dyke/CORP/Keane on 10/14/2002 11:40 AM -

RE: [PHP-DB] Fatal error: Call to undefined function: mysql_conne ct() ......

2002-10-14 Thread Jeffrey_N_Dyke
what are you passing for module(the first argument for dbx_connect) it should be DBX_MYSQL, or mysql, if that fails, recompile without the shared argument, and i bet that would work

Re: [PHP-DB] echo printing a cookie

2002-10-15 Thread Jeffrey_N_Dyke
I belive $_cookie is different then $_COOKIE Jeff Steve Dodkins

Re: [PHP-DB] images

2002-10-15 Thread Jeffrey_N_Dyke
to upload use copy and the $_FILES array. then around mysql, I tend to store the path in mysql and the images on the server. I personally don't like to work with blobs and don't think it makes as much sense as they do on the server. the space they take up in the db seems like a waste. my

[PHP-DB] Server Upgrade and DB Move(s)

2002-10-15 Thread Jeffrey_N_Dyke
I am in the process of upgrading my UNIX hardware and moving web sites from two different servers on to one server. I am curious as to opinions about moving/replicating the databases and peoples experiences. For the two that i have already done, i have taken a rather manual approach which was

Re: [PHP-DB] Server Upgrade and DB Move(s)

2002-10-15 Thread Jeffrey_N_Dyke
thanks guys. that is how i planned to do it, but i wanted to hear this from others. This is how i accomplished the other two moves. sometimes you just want to see if anyone has a better way. and the file copy method just seems to easy, it almost seems wrong ;-), but it doesn't stop me from

Re: [PHP-DB] Duplicates

2002-10-23 Thread Jeffrey_N_Dyke
select distinct Date from table_name where name = 'Test'; Jeff Chris Grigor

Re: [PHP-DB] Print data

2002-10-23 Thread Jeffrey_N_Dyke
I think this is only available as an option if you are running on windows based hardward, but if you are...i know i've seen it in the manual. José Moreira

Re: [PHP-DB] PHP and MS-SQL

2002-10-25 Thread Jeffrey_N_Dyke
yes this works. if your code is going to remian on Unix you'll have to install freetds (www.freetds.org). there are instructions on www.php.net/mssql for install in the comments... when you get to the site(freetds.org) I know it says Sysbase..but it is what you're looking for. hope this

Re: [PHP-DB] URGET HELP : Logic Help - for first record do_this for eachrecord after do_that

2002-10-25 Thread Jeffrey_N_Dyke
I'm sure there are a hundred ways $rs = 0; // record set array for ($i = 0; $i count($rs); ) { while($rs = mysql_fetch_array($result)) { if ($i ==0 ) { //do first thing } else { //do other things } $i++ } Jeff

Re: [PHP-DB] MySQL Insert Select statement

2002-10-19 Thread Jeffrey_N_Dyke
what was the error? dwalker

Re: [PHP-DB] Dealing with Unchecked Checkboxes

2002-10-28 Thread Jeffrey_N_Dyke
how about a default value...so if you use a CHECKBOX_FIELD1 ENUM('Y', 'N') DEFAULT N type of definition, then if box is not checked, then it will deault to N otherwise a Y will override the default. just a thoughtdont' know if it will work for you or not... Jeff

Re: [PHP-DB] Inserting current date(MySQL)?

2002-10-30 Thread Jeffrey_N_Dyke
it looks like you have defined $ADDDATE and it is not a posted variable. what happens if you just have: ?php $ADDDATE=date(Y-m-d); mysql_query (INSERT INTO client (cl_add_date, cl_first_name, cl_last_name, cl_company, cl_phone, cl_email, cl_address, cl_city, cl_state,

Re: [PHP-DB] mail()

2002-10-31 Thread Jeffrey_N_Dyke
did you restart apache? epeloke@echoma n.com (Edward

Re: FW: [PHP-DB] COOKIE problem... URGENTLY NEEDED HELP - BEGGING

2002-11-01 Thread Jeffrey_N_Dyke
Hey arron... can you send the the set cookie code and set up of your servers. this works fine on a site that i'm working on. I have the https running as a virtualhost in apachemust be an easy fix. jeff |---| | Jeff | KeaneIT - Presidents | | Landing |

Re: [PHP-DB] killing cookie

2002-11-01 Thread Jeffrey_N_Dyke
you need the exact same parameters as you used to set the cookie. http://www.php.net/manual/en/function.setcookie.php Seabird

Re: [PHP-DB] uploading

2002-11-05 Thread Jeffrey_N_Dyke
You're close, from what i can see just remove teh [ ] after the userfile or account for the fact that it is an array, but if you only have one file then you don't need it...and secondly, you're not calling your file anythign...you need to provide it a nameunless it defautls to the

Re: [PHP-DB] sort by date

2002-11-06 Thread Jeffrey_N_Dyke
Agreed. we prove day in and out that the answers are only an email away...why would anyone go a different route. manual? whats a manual? There are some brilliant people on this list, but some equally intelligent people wrote some fine documentation.

Re: [PHP-DB] Imploding an array?

2002-11-06 Thread Jeffrey_N_Dyke
isn't $order_index[$i] only one index? or is it multi dimensional? Aaron Wolski

Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread Jeffrey_N_Dyke
are you stating the session on on the other pages with session_start()? what errors are you getting? if you check for session_is_registered (user) on the other pages, what do you get? can you send some code along, its hard to see what the issue may be without it.

Re: [PHP-DB] date questions in mySql

2002-11-12 Thread Jeffrey_N_Dyke
check out the date( ) function in mysql. a quick prelude of it is.select date(date_col, %m/%d/%Y) from table...this will take -mm-dd and return mm/dd/

Re: [PHP-DB] Passing multiple form variable in PHP

2002-11-12 Thread Jeffrey_N_Dyke
using the [] makes your variable an array when it comes into php. **snip** else { print 'form name=sqlform method=post action=test.php?task=check font class=look2Multiple Check:/font select multiple name=icon[] option value=falseFalse/option option value=trueTrue/option

Re: [PHP-DB] How to do this..

2002-11-12 Thread Jeffrey_N_Dyke
put it inside a preg_split where you say that [?KR] in the brackets are the possible identifiers, and the brackets are required. that should work. i.e $chunks = preg_split( /[?KR]/, $string[query]); THis would also work with split. Something like that might work for ya hth Jeff

Re: [PHP-DB] A Question on Javascript

2002-11-14 Thread Jeffrey_N_Dyke
The relationsionship can be maintained by window.opener from within the child wildow - parent window, and the simply the name of the window you assigned can be used when going from the parent window - child window. hth jeff

RE: [PHP-DB] date()

2002-11-18 Thread Jeffrey_N_Dyke
you can use the mysql date function and format it as you're pulling it out of MySql select date(column_name, %m/%d/%Y) from table; this will return it formatted like 11/18/2002 or there are other options. http://www.mysql.com/doc/en/Date_and_time_functions.html this seems to be whar you're

RE: [PHP-DB] date()

2002-11-18 Thread Jeffrey_N_Dyke
whooops. I meant DATE_FORMAT. Sorry. Jeffrey_N_Dyke

Re: [PHP-DB] Index on email or ID?

2002-12-04 Thread Jeffrey_N_Dyke
the id is definitely better. although creating an index on the email and potentially the password would help. I had a table that was indexed off of a random unique string and when i got to about 5+ rows updates were taking about 4 seconds. you can authenticate with the email and password,

Re: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread Jeffrey_N_Dyke
do you have the persmissions set either for [EMAIL PROTECTED](which would only work from remotehost.com) or username@'%' (which would work for that username from any host) hth jeff

[PHP-DB] http/https

2002-12-07 Thread Jeffrey_N_Dyke
can a cookie be valid and be passed to/from -- http and https. I loose the values from http - https. I can think of ways to fix this, but i didn't know if there was a way in the basic setting/handling of cookies, and the manual shows you how to but it says that a 1 for a secure argument will

RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Jeffrey_N_Dyke
this little snippet works for me. mssql_query(set textsize 65536); HTH Jeff Adam Voigt

Re: [PHP-DB] mysql-windows xp

2002-12-13 Thread Jeffrey_N_Dyke
probably b/c of grants/rights did you run a -- grant all on *.* to user@localhost ? or something of the sort. or set up root to have access can you connect via command line? HTH Jeff

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread Jeffrey_N_Dyke
that didn't cause me any issues on my install. why do you have to turn that off. i'm not doubting you, just curious? Jeff SELPH,JASON

Re: [PHP-DB] What is a wrong parameter count error mean?

2002-12-27 Thread Jeffrey_N_Dyke
the function takes a certian number of required arguments(or parameters) and you're not passing enough. For this funtion it only takes one, which is the ldap resource link identifier. which was probably set in $var = ldap_connect(ldap_server). here the resource link identifer would be $var.

Re: [PHP-DB] Searching DB and Printing Results

2002-12-30 Thread Jeffrey_N_Dyke
this can be done with Full Text Searchingdepending on DB compatability. if you use mysql - http://www.mysql.com/doc/en/Fulltext_Search.html HTH Jeff

Re: [PHP-DB] Renaming a file uploaded by a form.

2003-01-01 Thread Jeffrey_N_Dyke
copy($_FILES['userfile']['tmp_name'],/real/path/to/$_FILES['userfile'] ['name']); what you really want is... http://www.php.net/manual/en/features.file-upload.php hth jeff

Re: [PHP-DB] Renaming a file uploaded by a form.

2003-01-04 Thread Jeffrey_N_Dyke
did you compile PHP with --enable-mime-magic? if not, this extension will not work. there are work arounds. one isa class that resides on phpclasses.org that will give you a mime based on the file extension. and i'm sure there are other ways hth jeff

Re: [PHP-DB] displaying a MySQL date in a different format

2003-01-04 Thread Jeffrey_N_Dyke
SELECT DATE_FORMAT(NOW(), '%m/%d/%Y'); will out put 01/04/2003. replace NOW() with you're column name. check out hte mysql manual for all of the date variations. hth jeff

Re: [PHP-DB] Re: blob

2003-01-07 Thread Jeffrey_N_Dyke
I agree with this method. i have not yet seen an advantage of storing blobs in a database. Is there one? i'm sure those on this list would have an opinion if there was one. personally, i like storing all this stuff on the file system. Jeff

Re: [PHP-DB] Re: blob

2003-01-08 Thread Jeffrey_N_Dyke
i know this is a bit down the chain, but i'm trying to keep the message strings in tact but can't you set up your directory just like you set up your mysql Grants. I have a directory that the web user owns, who is in its own group. so i set the permisssions once, and its done. Also i don't

Re: [PHP-DB] php-mysql connect

2003-01-12 Thread Jeffrey_N_Dyke
does this have anything to do with register_globals being off. are you using $_POST['var_name']? or $_GET['var_name']? can you send some code? jeff Jared

Re: [PHP-DB] Re: Identifying clients?

2003-01-18 Thread Jeffrey_N_Dyke
it seems to me that this is to much work for the output. not only will ISPs add complexity, but since you are combining thee seperate items you confining people to a single location. any laptop user may come in from various ips and still be unique. I tend to stay with the information you

Re: [PHP-DB] tutorials

2003-01-21 Thread Jeffrey_N_Dyke
if you're looking to do math in sql, i'd look to the mysql manual. lots of great examples. basically same answer for php. i'd start there...if you don't find what you're looking for .google. www.php.net/math www.mysql.com hth Jeff

Re: [PHP-DB] inserting dates

2003-01-22 Thread Jeffrey_N_Dyke
check out DATE_FORMAT in the mysql manual. and acually you'll want year-month-day not year/month/day...if you're using the mysql defualt date. DATE_FORMAT(NOW(), '%m/%d/%Y') - would return 01/22/2003 hth jeff

Re: [PHP-DB] ms sql limit equivalence

2003-01-23 Thread Jeffrey_N_Dyke
i forget exactly how to use it, but look up TOP. although it does not perform like LIMIT. hth Jeff Grant, Dean

Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Jeffrey_N_Dyke
it IS 3306(in a default setup) that you'll need to allow traffic through the firewall for this scenario. I have similar needs and that is the port we open.

Re: [PHP-DB] Flash, MySQL PHP

2003-01-30 Thread Jeffrey_N_Dyke
flash is server independent. if you call a flash file on another server it is much like calling an image on another server. yes, PHP can feed flash(info from a DB...to keep this on topic). And flash can send back infomation to PHP via get and post variables(not sure about the post). I've run

Re: [PHP-DB] warnings

2003-01-31 Thread Jeffrey_N_Dyke
sorry i don't speak (spanish?)...but this means you have sent information to the browser before the header() function call. even a space at the top of the page, before the opening ?php tag will cause this. hth jeff

Re: [PHP-DB] warnings

2003-01-31 Thread Jeffrey_N_Dyke
hello. sorry to have tried to guess at the language. I've received a couple emails, some nicer then others. i had no intention of insulting anyone, i meant no offense. unfortunately i could not read his statement but knew his issue, luckily he is smarter then I am, and understood my reply.

Re: [PHP-DB] Date format in MySQL

2003-02-03 Thread Jeffrey_N_Dyke
Or if you want to change it when you're pulling out of mysql you can use the DATE_FORMAT( ) function... hth jeff John Krewson

Re: [PHP-DB] Help with select box - multiple...

2003-02-05 Thread Jeffrey_N_Dyke
You can take the selected items posted to your page and use in_array() to search for the current item as your code creates the list. this is a chunk of code that i use to do the same thing. I wrote this a long time ago, so there may be better ways to do thisbut it works. ;-) snip if

Re: [PHP-DB] file and https

2003-02-21 Thread Jeffrey_N_Dyke
This works as of 4.3 with fopen(https://myserver.com). but i dont' think it works with file(https://myserver.com)...i may be wrong, of course. HTH Jeff

RE: [PHP-DB] Populate Array During Loop With in_array

2003-03-06 Thread Jeffrey_N_Dyke
personally, i think solutions are always worthwhile, no matter how trivial. that way when someone is searching the archives, they will find the solution in the thread. just my $.02 Jeff

Re: [PHP-DB] Display TEXT field value

2003-05-27 Thread jeffrey_n_Dyke
if i'm understanding you correctly, you're looking for this??? nl2br() http://www.php.net/manual/en/function.nl2br.php John M.

Re: [PHP-DB] Email an attached file

2003-05-29 Thread jeffrey_n_Dyke
www.phpclasses.org is your best bet. there are plenty. personally i use this one..http://phpclasses.com/browse.html/package/32.html check out his site for examples. hth jd

RE: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread jeffrey_n_Dyke
$qry = SELECT * FROM TABLE_NAME; $result_set = mysql_query($qry) or die(mysql_error()); ***this has to be called before any headers are written to the browser. *** header(Content-type: application/csv); header(Content-Disposition: attachement; filename=YOURFILENAME.csv); while

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

2003-06-26 Thread jeffrey_n_Dyke
may be missing the point. but when you're brining down the page decide what records the user can and can't delete and write javascript function(s) using php for the correct scenario, I'd write a single js function that you'd pass one(many) PHP variable(s) into, when building the page, after

Re: [PHP-DB] MySQL error message...

2003-06-30 Thread jeffrey_n_Dyke
mysql knows. this means your query failed, $command resulted in an invalid result set. try adding: or die(mysql_error()); to any call to mysql_query ()so in your code use this: $result = mysql_query($command,$mysqlHandle) or die(mysql_error()); - and - $resultw =

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

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] 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] 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] 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] 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] 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] 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] 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

  1   2   >