Re: [PHP-DB] Oracle and upper case field name

2004-01-27 Thread Daniel Clark
I might try having a common PHP function that converts all field names to lower case, and call that function with every field name. Or call each field by column number, $row[1] . When Oracle returns the result set, the field names are all in upper case. However, I have an application that

Re: [PHP-DB] Oracle and upper case field name

2004-01-27 Thread Daniel Clark
Yeah, Looks good to me :-) Like http://us2.php.net/manual/en/function.array-change-key-case.php ?? When Oracle returns the result set, the field names are all in upper case. However, I have an application that needs to work on both MSSQL and Oracle. I don?t want to keep 2 copies. One has

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

2004-02-26 Thread Daniel Clark
What about the single quotes? Might try this. $sql = INSERT INTO log SET term=\'$search\', returns=\'$arrayword\', time=CURTIME(), date=CURDATE(), ip=\'$ip\'; $sql = INSERT INTO log SET term='$search', returns='$arrayword', time=CURTIME(), date=CURDATE(), ip='$ip'; echo $sql; $logit =

Re: [PHP-DB] INSERT dynamic values problem - Need help urgently!

2004-02-27 Thread Daniel Clark
Try: OPTION VALUE=\$row['class_code']\ .$row[class_code]. /option; while ($row = mysql_fetch_array($sql)) { print OPTION VALUE=\$class_code\ .$row[class_code]. /option; } $result = $db-query($sql); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] mysql_num_rows

2004-03-03 Thread Daniel Clark
$query =SELECT username FROM users WHERE username=('$username'); // $result = mysql_query($query, $db); Above line should be uncommented. if (!$query) And the if checking the number of rows returned from the $result set. -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Php datetime

2004-03-04 Thread Daniel Clark
I've heard you want to use a TIMESTAMP field for that. i have created a mysql table where i would like to store the date and time whenever a user logs into a web site. the login is done through php/mysql as well but i'm not sure what the php code is to add the current date/time into a

Re: [PHP-DB] password input type

2004-04-05 Thread Daniel Clark
I'm pretty sure it just shields the on looker from viewing. View source in the browser still shows what the VALUE is, if any. Does using a pasword input type input name=password type=password make the transfer more secure from someone sniffing my connection or does it only shield an onlooker

Re: [PHP-DB] Session_Start won't work Help?

2004-04-09 Thread Daniel Clark
In PHP.INI there is a variable session.save_path. Make sure it's uncommented and has a directory to store the temp session files on the web server. I'm running Apache/2.0.49 and PHP/4.3.5 on windows XP. I get warnings: WARNING: session_start(): open/tmp\sess_242f6f668d85d512f9f4379ffa1e1,

Re: [PHP-DB] get rid of the HTML tags

2004-04-12 Thread Daniel Clark
Try strip_tags() http://www.phpbuilder.com/manual/function.strip-tags.php I have this string: $my_string = bhello world/ba href='teste.php'this is a test for a link with a image img src='test.jpg'/a Is there any function that retrieves only the string without the html tags?! -- PHP

Re: [PHP-DB] [PMX:55%] Re: [PHP-DB] get rid of the HTML tags

2004-04-12 Thread Daniel Clark
I've been getting the same errors, sometimes days latter. Why are my posts not getting through? I got 3 Delivery Report Failures on Thursday all due to Diagnostic was Unable to transfer, Message timed out Information Message timed out -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] How to Erase MySQL table.

2004-04-19 Thread Daniel Clark
TRUNCATE table xxx will delete all the rows of data. DROP table xxx will delete the table. Hi everyone, I can not find in my manual a MySQL command which erase permanently a table and it?s content from a MySQL database. Thanks in advance Charalambos

Re: [PHP-DB] logic problem

2004-04-21 Thread Daniel Clark
How about: SELECT convert( varchar,eventime,110) as date from events, badge, count(convert( varchar,eventime, 110)) as count WHERE events.cardnum = badge.id and devid = '1' and convert( varchar, events.eventime, 110) BETWEEN '$startdate' and 'enddate' AND type = '1' GROUP BY convert(

Re: [PHP-DB] logic problem

2004-04-21 Thread Daniel Clark
AND: any count =1 shows they came in that day. How about: SELECT convert( varchar,eventime,110) as date from events, badge, count(convert( varchar,eventime, 110)) as count WHERE events.cardnum = badge.id and devid = '1' and convert( varchar, events.eventime, 110) BETWEEN '$startdate' and

Re: [PHP-DB] logic problem

2004-04-21 Thread Daniel Clark
On Wed, 21 Apr 2004, Daniel Clark wrote: AND: any count =1 shows they came in that day. How about: SELECT convert( varchar,eventime,110) as date from events, badge, count(convert( varchar,eventime, 110)) as count WHERE events.cardnum = badge.id and devid = '1' and convert( varchar

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

2004-04-22 Thread Daniel Clark
What about removing the quotes around the numbers. if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 etc... My IF statement should be picking up on the numbers, and if the number matches not be displaying out the information, however I look at the outputted page and the information is

Re: [PHP-DB] Need some HELP

2004-05-10 Thread Daniel Clark
unless you have Globals turned on, I think you and $_POST['variable_name_here'] in the second page. print INPUT TYPE='hidden' NAME='UserName' VALUE='$_POST['username']\n; Hi, I am a new to php. I am using php ver 4.0.3 and MySQL. I have wrote two files and I'd like to pass some varaibles

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

2004-05-10 Thread Daniel Clark
Is it User_name or UserName? Also try this string with 'UserName' in single quotes. print INPUT TYPE=\hidden\ NAME=\User_name\ VALUE=$_POST['UserName']\; I've tried but still does not work. when I put the varaibles name between ' ' I found this error: Parse error: parse error,

Re: [PHP-DB] Serious Problem: Eval'ing conditioned blocks!

2004-05-10 Thread Daniel Clark
I had something like this too. I used something other for the start and ending blocks. # # Then had a replace() section. Hi there, I (still :-) ) have the code of my php pages stored in a database. A main page parses this code using the eval_html function postet at php.net. This used to

Re: [PHP-DB] Newbie inserting into a database

2004-05-14 Thread Daniel Clark
Remove the single quotes or change to double quotes around the variables. Here is what I have so far? ? $DBname = testdatabase; $host=localhost; $user=root; $password = password; $dbconnect = @mysql_connect('$host','$user','$password','$DBname'); I know this is wrong

Re: [PHP-DB] Newbie inserting into a database

2004-05-14 Thread Daniel Clark
Remove the single quotes or change to double quotes around the variables. (in the mysql_connect() statement) Here is what I have so far? ? $DBname = testdatabase; $host=localhost; $user=root; $password = password; $dbconnect =

Re: [PHP-DB] inserting data into database!

2004-05-14 Thread Daniel Clark
$tmp isn't defined yet, so can't append to it's self. (no .= ) $tmp = ID : $row-ID br\n; Two questions? First why am I getting undefined variable tmp , yet it works Second how would I insert data into this table? ? $db_table = 'log'; $conn = mysql_connect($db_host,$db_user,$db_pass);

Re: [PHP-DB] Re: how to parse php code stored in databases?

2004-05-08 Thread Daniel Clark
Torsten is right. eval() works great ... and so does having your php code in the database :-) Florian Wagner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there, I thought it would be a great idea to store the code of nearly all my web pages in text fields of a mysql database.

Re: [PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread Daniel Clark
Very odd. I would think it would return every record seeing as the auto_increment ID field is different for every record. I use SELECT DISTINCT tip, marca, model FROM modele to select records without duplicates on the field tip. This works ok, BUT if I use SELECT DISTINCT tip, marca, model, id

Re: [PHP-DB] First letter

2004-04-27 Thread Daniel Clark
$rest = substr(abcdef, 1, 3); // returns bcd http://www.phpbuilder.com/manual/function.substr.php What PHP function returns just the first letter of a string? - Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database

Re: [PHP-DB] Session

2004-04-27 Thread Daniel Clark
Depends on the browser. IE and Netscsape handle opening another window differently. Hi, I have a problem in handling session... so I just reply in this topic. I have created a site... when user login from one browser ..i set a session['user'] the problem is that when user open another

Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Daniel Clark
I think you want single quotes around PHP_SELF. $_SERVER['PHP_SELF'] I have a script where it uploads a image to directory. I have used the script several times and it works when I send the form to another page. The problem is I have changed the form to submit to itself and I can't seem

Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Daniel Clark
: www.eclimbmedia.com _ On Apr 29, 2004, at 6:49 PM, Daniel Clark wrote: I think you want single quotes around PHP_SELF. $_SERVER['PHP_SELF'] I have a script where it uploads a image to directory. I have used the script several times and it works when I send

Re: [PHP-DB] headers and if statements

2004-04-30 Thread Daniel Clark
Hum. Is $logIn null at times?!?! ?if($logIn != 1) {header(Location: loginError.php);}? Why does this direct me to loginError.php even when $logIn = 1? - Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] headers and if statements

2004-04-30 Thread Daniel Clark
I think that would try to set $login=1. Need two == Have you tried: ?php if (!$login=1) {header(Location: loginerror.php);)? -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 4:19 PM To: matthew perry Cc: [EMAIL PROTECTED] Subject: Re

RE: [PHP-DB] headers and if statements

2004-04-30 Thread Daniel Clark
We've ALL done it before :-) I am testing now testing it with the ==, silly mistake -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 4:38 PM To: Erik Meyer; PHP-DB Subject: Re: [PHP-DB] headers and if statements From: Erik Meyer

Re: [PHP-DB] Image / file uploader

2004-05-06 Thread Daniel Clark
I think you need the quotes: $_SERVER['PHP_SELF'] Try using the following: $_SERVER[PHP_SELF] Mainly, get rid of the quotes inside the brackets. Usually this error 'T_String' generally occurs when you have quotes ( or ') where they shouldn`t be. Give it a try if that thing still troubles

Re: [PHP-DB] Select news based on dates

2004-05-17 Thread Daniel Clark
ORDER BY date, text ? Hi! You can use order by date and such method: code $result = mysql_query(blablabla); $date = foo; while($news = mysql_fetch_array($result)){ if ($date==$news[date]){ echo new date; } echo $news[text]; $date = $news[date]; } Monday, May

Re: [PHP-DB] Undefined variable

2004-05-26 Thread Daniel Clark
Are you using a FORM Post or Get ? Perhaps $_POST['Name'] or $_GET['Name'] Hi!! I have a very simple and smail script with just one input text box and a submit button. After that, I have an echo function in the same code page that just displays the data entered in the text box. But I'm

Re: [PHP-DB] Where Error

2004-05-29 Thread Daniel Clark
Can you post the code? Something like: WHERE status IN ('i', 'c', 'o') ; This should be ultimately simple; it just doesn't work. I want to limit display to rows from a single table in which the status column contains i. Only options are i, c, o. After the select line I have where

Re: [PHP-DB] Where Error

2004-05-29 Thread Daniel Clark
order by $sort_field $sort_order; ** On Sat, 29 May 2004 07:50:52 -0700, Daniel Clark [EMAIL PROTECTED] wrote: Can you post the code? Something like: WHERE status IN ('i', 'c', 'o') ; This should be ultimately simple; it just doesn't work. I want to limit display to rows from

Re: [PHP-DB] Question about undices for inversed LIKE statesments.

2004-05-31 Thread Daniel Clark
The index should still work normally. Hello. I have a question about behaviour of indices in queries with inversed LIKE in MySQL. I mean something like this: select foo from bar where '$some_string' LIKE some_field where in the `some_field` I have a strings like 'symbols%' :) Do you have some

Re: [PHP-DB] Re: big/small letters with oracle No2

2004-06-03 Thread Daniel Clark
I've used Oracle for years, and am not aware of Oracle having case sensitive column names. Torsten Lange [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] But when using queries on the USER_... data dictionary, Oracle delivers always big letters, which is for chemical elements (NA

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

2004-06-03 Thread Daniel Clark
Is this what you want ?? $sql = SELECT DISTINCT(email) FROM $table; $result = mysql_query($sql,$connection) or die(Couldn't execute query 0.); $row1 = 0; while ($row = mysql_fetch_array($result)) { echo $row[email] ; $sql1 = SELECT * FROM $table WHERE viewed = '1' AND

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

2004-06-03 Thread Daniel Clark
OK, how about this? $sql = SELECT DISTINCT(email) FROM $table; $result = mysql_query($sql,$connection) or die(Couldn't execute query 0.); while ($row = mysql_fetch_array($result)) { echo $row[email] ; $sql1 = SELECT * FROM $table WHERE viewed = '1' AND email = '$row[email]';

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

2004-06-03 Thread Daniel Clark
Not tested... how about something like this? SELECT t1.email, t2.count(*) FROM $table t1 LEFT JOIN $table t2 ON (t1.email = t2.email and t2.viewed = '1') GROUP BY EMAIL Nope... HHmmm, this is really getting to me... I can do distinct, I can count, but I can't combine the two? Can't be that

Re: [PHP-DB] Error loading module: Unable to load dynamic library 'c:\tools\php\extensions\php_oci8.dll' - The specified procedure could not be found

2004-06-04 Thread Daniel Clark
Is the file in c:\tools\php\extensions\php_oci8.dll ? Hi, I am experiencing the message in the title of this message when starting or restarting Apache. I have the following configuration: - Windows XP - Apache 2.0.49 - PHP 4.3.6 - Oracle Client 8i If anyone has any information as to why this

Re: [PHP-DB] strange results in mysql with readdir.php

2004-06-06 Thread Daniel Clark
I'd think there where multiple files with jpg and gif extensions. Like: image1.jpg image1.jpg.jpg Anybody has an idea about what happened to me ? The following script should just charge in a mysql db the images located in a directory. Unfortunately everytime I call readdir.php (never mind if

Re: [PHP-DB] About retrieving auto increment value

2004-06-07 Thread Daniel Clark
I think you want mysql_insert_id() http://us3.php.net/manual/en/function.mysql-insert-id.php I have the typical problem with retrieving auto increment value in php-mysql environment. I have search info in mysql page and I have found LAST_INSERT_ID() funtion but I don't know how to use

Re: [PHP-DB] anonymous select error

2004-06-15 Thread Daniel Clark
I'm not sure you need a semi-colon after the table name. $result = mysql_query( 'Select * From newsletter_subscribers', $db ); To: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I'm trying this query: $link = mysql_connect( $site, $id, $pass ); if (!$link) {

Re: [PHP-DB] Multiple Inserts

2004-06-22 Thread Daniel Clark
Good point. Since it's form data, what about $_POST['TimesheetID'] ? Don't see anything obviously wrong with your query string. Are the inserts happening in the same block of code, i.e., are you sure that _$TimesheetID_ has a value in it when you're performing the second insert? -dave I

Re: [PHP-DB] problem....

2004-06-22 Thread Daniel Clark
What error are you getting? why doesn't this work: $pic=mysql_query('SELECT Rune, username FROM RuneRunner RuneRunner_1 WHERE (User_ID = 3)',$connection); $pic=mysql_fetch_array($pic); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] [PHP]: session problem

2004-06-24 Thread Daniel Clark
Are you getting any errors displayed? The php.ini file has to have a directory specified for the session temp variables. I want to use sessions to check wether a user is logged in or not. Therefore,I use session_start and session_register. When I registere the values on the same page, they

Re: [PHP-DB] [PHP]: session problem

2004-06-24 Thread Daniel Clark
What are you setting $_SESSION['sid'] to? i do ($_SESSION['sid']), but the variables remain empty... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Date help needed

2004-06-24 Thread Daniel Clark
A drop down with 365 days !?!? Isn't that a little big? 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

Re: [PHP-DB] Auto increament

2004-06-27 Thread Daniel Clark
Yes there is an auto increment field in mySQL and most other databases. Can any of you guide me how to do auto increament in a field? I think there is one datatype for auto increament. But I dont know how to do it ? Rinku -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,