On Mar 26, 2008, at 12:30 PM, Evert Lammerts wrote:
OK. Tried that and count comes back as 1.
So your query returns only one record. Try
$query =Select answer from answers;
Why not do a var_dump() on $result to verify that it
is a mysql result resource and then verify the count
of rows
to
take tables in this format for processing, we just need to parse the
query data into a text result.
Thanks,
Brent Anderson
~~~
Jeremy Glover
Interactive Communication Developer, Trone
336.819.6934
[EMAIL PROTECTED]
Confidentiality Notice: This e-mail communication
Can anyone help me figure out what is wrong with this syntax. Thanks.
list($qh,$num) = dbQuery(SELECT password AS passwd1,
$DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 .
FROM $USER_TABLE WHERE username='$username');
$data = dbResult($qh);
--
PHP Database Mailing List
A friend of mine updated your regular expression... Check it out if your
interested.
Jeremy
Dear Jeremy,
Thanks for writing!
I saw this regular expression and thought you might like it... :)
preg_replace(/^\/?(.*)\/[\w]+\.php$/,$1,$PHP_SELF)
that strips that leading forward slash
when it is live.
die(mysql_error());
}
$numRows = mysql_num_rows($sql_query);
if (($numRows) 0){
$valid = $user;
session_start();
session_register(valid);
}
}
if (session_is_registered(reg)){
echo ok;
}else{
echo sorry;
}
?
Jeremy Shovan
-Original Message
Mysql LOAD DATA INFILE '/tmp/jokes.txt' INTO TABLE jokes FIELDS
TERMINATED BY ''
http://dev.mysql.com/doc/mysql/en/mysqlimport.html
http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html
Jeremy Shovan
-Original Message-
From: Ruprecht Helms [mailto:[EMAIL PROTECTED]
Sent: Monday, January 17
slightly faster...
Second change the third line there to:
$DB_sub_ref .= substr($DB_temp_ref , -1);
That should do the same thing, grab the last character in that string. Try
that and see what you get.
Jeremy
James Meers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi all,
I am
even simpler you could add a counter column to each vegetable table and
increment it...that will save you an extra table.
Jeremy
Ricardo Lopes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
you could create a counter table and store there the vegetable id and the
hits. After
Try this:
select LastName from MyTable where left(LastName,1) = 'a' and
left(LastName,1) 'f';
How about
Select LastName from sometable where LastName = 'A' and LastName 'F'
Hth Henrik Hornemann
-Oprindelig meddelelse-
Fra: Doug Parker [mailto:[EMAIL PROTECTED]
Sendt: 29. december
Use the strtoupper() function
$var = strtoupper($var);
-Original Message-
From: Robert Sossomon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 8:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Changing case
I have a form that allows for an item to be entered,
I was able to get rid of the parse error, but what I saw causing the
error was a little strange. All I did was delete the spaces between
your if statement and the bracket that follows ie. if( not if (
The next thing that I did was rewrote the line that says 'echo
tdOpen/td;' although I didnt
Try rewriting your query. It looks to me that you probably have an
error in your SQL statement and it only seems fine because you appended
the @ to the beginning of the mysql_query() function.
I would suggest using a join statement.
If(!$result = mysql_query(SELECT orders.orderid,
You are selecting it as date but trying to echo DateOfOrder
Try this:
$TheDate = mysql_query(select DATE_FORMAT(DateOfOrder, '%d, %m, %Y') as
date from Orders Where Orders.ID = '$TransID');
while($OrderDate = mysql_fetch_array($TheDate))
{
$Date = $OrderDate[date];
}
-Original Message-
Try this
WHERE date_field != $date_1 OR date_field != $date_2 OR date_field !=
$date_3
-Original Message-
From: Mike Baerwolf [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 6:46 PM
To: [EMAIL PROTECTED]
Subject: mysql field comparison to multiple variables
Hello,
I trying to
Try this, I am assuming that emailerror is one of the fields in your
database.
$thisstart=$massmail[current]-1;
[EMAIL PROTECTED](select
first_name,last_name,email,.$mysql_prefix.users.username
from .$mysql_prefix.users $leftjoinfirst $leftjoinsecond
limit $thisstart,$massmail[stop]
where
Is it a frame page?
-Original Message-
From: agus supriatna [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 1:25 AM
To: [EMAIL PROTECTED]
Subject: Need help Get/send Variabel to another window
Dear all
I have two page one as main and secon as child, now I have problem how
to
window
I'm guessing this is html?
Parent.opener.formname.formfield.value = this.value;
Michael Scappa
-Original Message-
From: Jeremy Shovan [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 12:24 PM
To: 'agus supriatna'; [EMAIL PROTECTED]
Subject: [PHP-DB] RE: Need help Get
Use echo(mysql_error());
-Original Message-
From: Ben Edwards [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 5:43 AM
To: pete M
Cc: PHP DB List
Subject: Re: [PHP-DB] mysql_error() (was Re: Getting last insert id?)
On Thu, 2003-10-09 at 17:35, pete M wrote:
.
As for handling the no results situation you can do the
following.
if(!$result = mysql_query($query)) {
echo(could not query the database);
} else {
if(mysql_num_rows($result) == 0)
echo(No records found);
}
good luck
Jeremy
--
PHP Database Mailing
How do you pass by reference? I tried
$var = myFunction($var1, $var2);
but it gave me a warning saying that pass by reference is depreciated
-Original Message-
From: Gary H. Holabird [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 11:06 AM
To: [EMAIL PROTECTED]
Subject: Hyperlinks in MySQL dB
This has got to be really simple I feel really stupid having to ask
but...
I'm a very green n00b writing my first php
Try this
function send_html_mail($myname, $myemail, $contactname, $contactemail,
$subject, $message) {
$headers = MIME-Version: 1.0\n;
$headers .= Content-type: text/html; charset=iso-8859-1\n;
$headers .= X-Priority: 3\n;
$headers .= X-MSMail-Priority: Normal\n;
$headers .= X-Mailer:
show me how to do this? To be specific, it's just a table
with a list of US states in it...
table name: states
fields: state_id, name, abbreviation
Thanks,
Jeremy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to me.
Printing $sql returns the proper sql statement, so what is the sybase_query
function doing to the variable?
My code is at the bottom of this page.
Thanks,
Jeremy
?php
include $DOCUMENT_ROOT/include/sybase.inc;
$syb_connect = syb_connect($syb_server, $syb_user, $syb_pw);
$sql = select
Hey folks,
Im apologize that this is just a really easy general php question but any help would
be appreciated.
if i have a variable that is = to something like 0 or 1
but I just need it to be 0 or 1. how do i strip the off.
thanks,
Jeremy
It has to be HTML based, it can't install on the server.
- Original Message -
From: Leif K-Brooks [EMAIL PROTECTED]
To: Jeremy N.E. Proffitt [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 28, 2003 9:37 PM
Subject: Re: [PHP-DB] Creating MySQL Entry Forms
What's wrong
their is an easier
way...
Cheers
Jeremy
Hello,
I need some help from you MySQL gurus out there. This is pure SQL by the
way..no front-end.
Lets say you have a table that has 2columns.columnA,
ColumnB and columnC
I have something like this
if (columnA'7', (columnB/columnC) + 52, columnB/ColumnC) as Number
however i need to test
http://www7b.software.ibm.com/dmdd/library/techarticle/scott/0614_scott.html
is a good place to start. Also search google for db2 php...i got a lot of
hits...Sorry if anyone get this msg twice. :)
Jeremy
- Original Message -
From: Jack Schroeder [EMAIL PROTECTED]
To: [EMAIL PROTECTED
Here's a a site that has the basics. I got a whole lot of matches with db2
php at google.
Jeremy
- Original Message -
From: Jack Schroeder [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 10, 2003 8:54 AM
Subject: [PHP-DB] Will PHP work with IBM DB2 dbms?
Can anyone
the http post rather than
PHP. Is this possible.
Jeremy
P.S.
The script I am using right now incorporates Chris Alsop's class:
!-- CLASS START --
?php
## Archive:c_http.class
## Description:Basic http class functions (only post right now)
## Author: Chris Alsop
their secure database; however I will not give out this
information to students. I want to design a system that will log the
students on directly without them ever seeing the log in screen.
A) Does this make sense in what I am trying to do?
B) How can I do it?
Jeremy
At 12:38 PM 1/9/2003
with
--with-mysql=shared,/usr'
This is the redhat 8.0 default. I guess it just can't find the function library.
Any pointers any one could give would be really appreciated.
Thanks,
Jeremy Wood
No, I was unable to find a new version of it. Is there a version for php 4.2
?
Jeremy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$encrypted_string = md5(base64_encode($var.'secret key'));
Pass the user name or password to $var and place text in to replace the
words 'secret key'.
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 15, 2002 8:45 AM
To: 'Jason Vincent'; [EMAIL
.
That doesn't make it smart. :-)
--
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936
MySQL 3.23.51: up 29 days, processed 630,288,757 queries (251/sec. avg)
--
PHP Database Mailing List (http://www.php.net
Sure-
$test = text1;
if(substr($test, -1) == 1){
print do something;
}
else{
print didn't equal 1 ;
At 08:00 AM 5/17/2002 -0400, Natividad Castro wrote:
Hi to all,
how can I evaluate a variable?
For example
$test = test1;
then I want to evaluate if $test contains 1 at the
of
overhead I'd be creating.
Thanks,
Jeremy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to a secure site (https). I looked through some of the php
documentation and couldn't find anything about manually encrypting the data
to send or anything like that.
Any help would be greatly appreciated.
Thanks,
Jeremy Reed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe
select * from table where id in (1,3,5,10,'etc')
At 08:22 PM 2/7/2002 +0100, Raymond Lilleodegard wrote:
Hi!
Is there a way to get the rows with id's like 1, 3, 5, and so on or 2, 4, 6,
...?
Best regards Raymond
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe,
Hello,
I am not sure why you want to do this. Wouldn't it be better to use
calculate the days from the date signed up, rather than through updating
your database every day. Try using datediff.
Jeremy
At 01:51 PM 2/4/2002 -0800, Jennifer Downey wrote:
Hi,
I am having problems
that might be affecting it is the ownership.
The owner of the DB is 'dbo'--because this is a straight copy of a database
on an offsite server.
Any help would be greatly appreciated.
Best regards,
Jeremy Reed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
and you won't have to mess with
the web header stuff. Oh, and make sure that the PHP subdirectory is
included in the PATH. You can set this manually for testing by:
path=%path%;C:\PHP
Best regards,
Jeremy Reed
George Loch [EMAIL PROTECTED] wrote in message
001101c189a9$8eaa7a60$[EMAIL
What was the error message you received? Also, when passing the variables
to the mssql_connect() function, you need not use quotes since you've
already initialized them to the strings. Pass them as follows: $connection
= mssql_connect($a,$b,$c). Also, you aren't passing the actual sql string
Actually, your problem lies in your SQL code. Instead of DELETE * FROM
Table the correct syntax is DELETE FROM Table
Regards,
Jeremy Reed
Brian Grayless [EMAIL PROTECTED] wrote in message
C3C8C2499A63D211BB7D00A0C9E1C7060128707F@PRI-NT1">news:C3C8C2499A63D211BB7D00A0C9E1C7060128707F
I have pruned down my changes to the interbase module to just 2 bug fixes
and then my blob insert patch.
Where do I send these?
Please give me the name of someone that will add these to CVS and not just
blow me off.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
Use $dbh = ibase_connect (database, user, password, ISO8859_1,
0, 1);
The extra arguments are needed for any interbase 6.0
--
Jeremy Bettis
[EMAIL PROTECTED]
Maxim Pavlov [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello,
I have Interbase 5.5
php4.
I have attached the patch, it also changes blobs so that no special
processing is necessary to use them.
--
Jeremy Bettis
[EMAIL PROTECTED]
Kiss Marton [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi!
I like to insert null values with plac
append the correct 'ORDER BY' clause to the end of your SELECT statement
syntax:
ORDER BY fieldname_1 [[, fieldname_2], fieldname_n]
shouldn't matter what tables they are in as long as you can get the records
with SELECT
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
sorry jordan, ref. my last mail, use GROUP BY in exactly the same way
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: 25 April 2001 14:31
To: PHP Database Mailing List; PHP General Mailing List
Subject: [PHP-DB] Retrieving and Printing Categories
Hi,
I've got a
!
-
Jeremy D. Hise
Consulting Direct, Inc.
(212)736-5870 x228
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail
51 matches
Mail list logo