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
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
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 =
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:
$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
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
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
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,
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
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
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
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(
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
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
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
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
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,
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
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
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 =
$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);
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.
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
$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
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
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
: 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
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
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
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
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
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
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
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
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
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
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
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
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]';
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
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
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
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
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) {
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
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:
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
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
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
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,
50 matches
Mail list logo