[snip]
Is it possible to create an excel file with some data from mySQL, using PHP
?
[/snip]
Evan,
I'll send you the article I recently wrote for evolt.org, it details all of
the things you need to know. Excel will honor all HTML table formatting
issues, except color. Colors need to be stated
It is also possible to connect directly to MySQL from Excel via MyODBC.
-Rasmus
On Fri, 17 May 2002, Chris Boget wrote:
Is it possible to create an excel file with some data from mySQL, using PHP
?
Yes if you know the file format for excel. If not then write your data into a
CSV
It is also possible to connect directly to MySQL from Excel via MyODBC.
True, but only if you are running PHP on a windows platform, yes?
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No, this has nothing to do with PHP. You can run MySQL on Windows or
UNIX, doesn't matter, and set up a connection directly from Excel to
MySQL.
PHP can of course run anywhere you want and manipulate the data in MySQL
which will then be reflected in Excel.
-Rasmus
On Fri, 17 May 2002, Chris
[snip]
It is also possible to connect directly to MySQL from Excel via MyODBC.
True, but only if you are running PHP on a windows platform, yes?
[/snip]
Nope, no PHP, just the ODBC driver would have to live on Windows
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
No, this has nothing to do with PHP. You can run MySQL on Windows or
UNIX, doesn't matter, and set up a connection directly from Excel to
MySQL.
PHP can of course run anywhere you want and manipulate the data in MySQL
which will then be reflected in Excel.
Are there examples anywhere that
Are there examples anywhere that illustrate how this can be done? I'm not very
interested in looking into this alternative.
You are not very interested, but you want examples? Just read the MyODBC
docs at mysql.com.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To
Are there examples anywhere that illustrate how this can be done? I'm not very
interested in looking into this alternative.
You are not very interested, but you want examples?
eep, sorry. not should have been now.
Just read the MyODBC docs at mysql.com.
Excellent. Thank you very
wow.. 10-15gb.. where do you get that kinda hosting and for how much??
Here in Aus it'd cost you a packet.. Don't know where abouts in the globe
you are though..
Here in AUS my host only gives me 1gb p/m and 50mb space... for AUD$399p/a
that's USD$198... bit of a ripoff I think. but
On Monday, April 1, 2002, at 02:33 PM, Jay Fitzgerald wrote:
Can this be done and am I going about it the right way?
First, it's a bad idea to cross-post between mailing lists, even if they
seem like related topics. Second, what is it you're trying to do? Or
what does your application
On Mon, 1 Apr 2002, Jay Fitzgerald wrote:
I have created a database called friends with four columns:
Name / Address / City / State
I also made an XML file to coincide with those variables:
test
contacts
friends
nameFriend 1/name
On Monday, April 1, 2002, at 02:33 PM, Jay Fitzgerald wrote:
Can this be done and am I going about it the right way?
Are you familiar with something called partial decomposition? I'm not
sure where it came from, but Google suggests that it may have been
conceived by Daniel Appelquist, the
Shoot, kind of an important error I made in the code I gave you
earlier -- the closing quote for $xml_document should be a single-quote,
not a double-quote as I wrote.
Sorry,
Erik
On Monday, April 1, 2002, at 04:26 PM, Erik Price wrote:
Still, you want some advice? First, your SQL code
go to google, put in 'free mysql hosting', press 'feeling lucky' ..
http://www.free-php-hosting.com/
bvr.
Daniel Negron/KBE wrote:
Does anyone have a good site for free mySQL and PHP hosting ?
**DAN**
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Pickings are slim but you can have a look here:
http://www.alt-php-faq.org/links.html
See hosting. Good luck.
-Kevin
-Original Message-
From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 12:17 PM
To: PHP
Subject: [PHP] PHP/mySQL hosting
Does anyone
The PHP developers are aware of this, and are working with MySQL to make it
safer.
it should be noted that PHP safe mode, whilst making the environment
generally safer, is not an easy-answer to webserver security. The only real
solution is to learn about better security and configuration.
Hi Folks:
Gerard Onorato wrote on the PHP-GENERAL mailing list:
Security Advisory DW020203-PHP
Release: 3rd February 2002
PHP Safe Mode Filesystem Circumvention Problem
... snip ...
FIX
Currently, no fix exists.
... snip ...
A suggested fix for the PHP developers might be to scan
you must make sure that the version of PHP that is being used was built with
mysql support and/or that the drivers are being loaded for mysql.
Jim Lucas
- Original Message -
From: Uma Shankari T. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 6:24 PM
Subject:
Hello,
How do i recompile with mysql support
-Uma
--
PHP General 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: [EMAIL PROTECTED]
./configure --with-mysql...
which is build-in with PHP 4.0.* I think.
Frederic Trudeau
[A]dvanced [S]upport [A]gent
Colocation/Customer Support Agent
CAM Internet - http://www.cam.org
My God ! It's full of stars
On Wed, 30 Jan 2002, Uma Shankari T. wrote:
Hello,
How do i
If you recompile that will no effect any of the data in your DB if that is what
you mean?
-=Adam=-
Quoting Uma Shankari T. [EMAIL PROTECTED]:
Hello,
Already i am having so many details in my mysql database.If i do this it
won't affect the previous one..
-Uma
--
PHP
The reason you aren't seeing any errors is because you used or
die() -- to the best of my knowledge, this replaces any standard errors
that PHP would normally generate.
It appears that you have omitted the second argument to mysql_query().
A common mistake that I've made many times myself.
Try using mysql_error() to display the mysql error message before issuing
your die(). this will give more information to troubleshoot. You may not
have the right privileges set up in your database where you can update or
insert into the database or table.
/dkm
- Original Message -
Hawk,
If you have a working login, can we safely assume that there is information
in the database for each user? If so, then we won't bother discussing
insert statements, but concentrate on updates. We'll also assume that $user
has update privileges on the database.
The normal form of an
I hope I am not wrong, but the problem is with the
mysql_result() functions.
Instead, I would use:
whilie ($myrow=mysql_fetch_array($result)) {
//put whatever you like here.
}
and instead of
mysql_result($result,0,asl)
$myrow[asl]
I hope this helps.
from the manual
* Chris Cocuzzo ([EMAIL PROTECTED]) [Dec 25. 2001 03:16]:
here's the submit.php page ..which is the one that I suspect is giving me problems:
case 'gigs':
print $datebr;
$date = strtotime($date);
print $datebr;
$query = INSERT INTO gigs
I get:
unable to select database
when I visit my guestbook.php
The user trying it is set in the mysql.user (without any perms) and in
the
mysql.db (with all perms).
Do I have to set all perms to this user in the mysql.user table?
Did you 'flush privileges' ?
--
Jon Farmer
Systems
Have you checked the docs? Have you double-checked the username, password
and permissions?
Have you added or die(mysql_error()) to your database connection function?
If this site is remote, does your username/password have rights to access
the database?
Good luck - Miles Thompson
At 11:58 AM
: Wednesday, December 05, 2001 4:59 PM
To: Javier Muniz; '[EMAIL PROTECTED]'
Subject: Re: [PHP] PHP + MySQL problem (strange behavior)
On Thu, 6 Dec 2001 08:32, Javier Muniz wrote:
Hello,
I'm having trouble determining what's going wrong with a MySQL query
that I'm doing from PHP. Now before
On Thu, 6 Dec 2001 08:32, Javier Muniz wrote:
Hello,
I'm having trouble determining what's going wrong with a MySQL query
that I'm doing from PHP. Now before you go blaming MySQL read on :)
I have a table with the following columns:
id (int)
name (varchar 20)
starttime (int)
duration
a bunch of things:
1) when you read the image you need to use rb mode since it's
binary data
2) addslashes() isn't good enough. try mysql_escape_string instead.
3) the way you're doing it the handle to the image file never gets
fclosed(), I don't know if that's really a problem tho
4) if your
p $Query = INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device
p to pound on when frustrated.);
p $Results = mysql_query($Query)
p or die (Query FAILED);
need to embed your strings in like
$Query = INSERT INTO table_name (Obj,Descrip) VALUES (\keyboard\,\Device
to pound on when
Try putting single quotes around the strings:
$Query = INSERT INTO table_name (Obj,Descrip) VALUES ('keyboard','Device
to pound on when frustrated.');
Another thing that would be useful is to use the mysql_error() function in your die,
which will give a better indication of the problem
Hi,
from this command line test:
select imglocation,height,width from img where imgname='alfstag1'
it looks to me like your imgname field is *characters* rather than *numbers*.
when ever I'm doing something like this (eg WHERE firstName=justin), I
do it with a LIKE statement, rather than with
On Wednesday 31 October 2001 02:32 am, you wrote:
So, I'd recommend giving that a try. From my understanding (limited) of
MySQL, use = in the case of $id=2, and LIKE in the case of firstName
LIKE justin.
Um...you *can* do that, but I don't think you want to. Using LIKE means that
MySQL has
.
Thanks to Kurt and Justin for the help offered on this simple (now that it
is working) problem.
I do not know where my stumbling block was but after a good nights rest and
some coffee this morning I have this and the GetImageSize function
incorporated.. I will list the code incase someone
.
Thank you for the heads up on using like. I was wondering since there will
be 2 similar variables from each page var1 var2 (identical except for the
number). I programmed in DataFlex for about 6 years back in the late 80's
early 90's but have not done anything db wise in over 8 years I
On Wednesday 31 October 2001 07:45 am, turtle wrote:
img src=? echo $imglocation ? ? echo $size[3]; ?
Glad we could help. Also, you can re-write the above so you don't have to
define two sets of ?php ? tags by doing the following:
?php
print img src=\$imglocation\ $size[3];
?
Not a big
.
Thank you Kurt,
The day for the server to be move from Cal to Fla is the 31st (today)
I would image that it is somewhere in transit at the present time...
Will send you an email with another address you can respond to...
Thanks for all of your help
Mike
Kurt Lieber [EMAIL PROTECTED]
On Tuesday 30 October 2001 10:13 am, turtle wrote:
?
$link = mysql_connect('localhost')or die (Could not connect);
mysql_select_db('img760')or die (Could not select database);
$query = select ('imglocation','height','width') from img where
imgname=$getimg;
$imglocation = 'imglocation';
.
No reading that section of the manual did me no good. I do not understand
other than I cannot store the results as a variable.
Is there any of what I have done that is usable?
A recommendation for a book that covers this would be helpful... the manual
on this area is way to abbreviated for
On Tuesday 30 October 2001 11:58 am, turtle wrote:
No reading that section of the manual did me no good. I do not understand
other than I cannot store the results as a variable.
yes, you can.
Is there any of what I have done that is usable?
yes, there is. see below. It's probably not
.
It is starting to make sense. I see the correlation between the manual
example and the code you show. Surprisingly (and equally confusing) the
book I have also uses a while loop with mysql_fetch_array to display a list.
The getimg variable comes in from the javasript function on the other
On Tuesday 30 October 2001 02:53 pm, you wrote:
It is starting to make sense. I see the correlation between the manual
example and the code you show. Surprisingly (and equally confusing) the
book I have also uses a while loop with mysql_fetch_array to display a
list.
You would use a while
On Wed, 31 Oct 2001 11:25, sc wrote:
Hi;
i keep getting an error of: Warning: Supplied argument is not a valid
MySQL result resource in /datascripts/insertdata.php on line 17...
Line 17 is: $row = mysql_fetch_assoc($test);
and here is the rest of it (not all of it though):
for ($p = 1;
Or the single quotes around the table name in the sql string
Your query is probably broken - do some error checking after your
database call with mysql_error() and see what the problem is.
Guess; the table name.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Yeah sorry about that, didn't mean to send out 3...
Ok i got it working... thanks for all the replys...
-sc
David Robley [EMAIL PROTECTED] wrote in message
01103111392904.28397@www">news:01103111392904.28397@www...
On Wed, 31 Oct 2001 11:25, sc wrote:
Hi;
i keep getting an error of:
On Wed, 31 Oct 2001 11:47, Jason Brooke wrote:
Or the single quotes around the table name in the sql string
Your query is probably broken - do some error checking after your
database call with mysql_error() and see what the problem is.
Guess; the table name.
That's what I meant - but I
ok i thought it would be working, but on testing it more it still isn't
going for me i took off the ' ' from the table name and its still coming
up with an error on line 17 with the same error message... the mysql_error()
isn't echoing anything that has gone wrong.. (did before)..
Any ideas?
ql_errno($dblink);
or
echo mysql_error($dblink);
echo mysql_errno($dblink);
jim
- Original Message -
From: sc [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 6:01 PM
Subject: Re: [PHP] php mysql prob...
ok i thought it would be working, but on testing
are you pass the two functions you return link from mysql_connect() or
mysql_pconnect() ??
jim
- Original Message -
From: sc [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 6:15 PM
Subject: Re: [PHP] php mysql prob...
mysql_error returns nothing, mysql_errno
Kurt Lieber
You would use a while loop if/when you have multiple records to retrive.
From your original code example, it seemed as though you would only have
one
record. (though, for safety's sake, you should code a LIMIT into your sql
statement)
Yes I only need one image location with
On Fri, 26 Oct 2001 23:27, Gerard Onorato wrote:
Hello,
I am a recent return to the list. Wow has the traffic grown! This is
awesome.
I have a couple of questions and one may be a RTFM but I can't find the
answer.
#1) While I thought I was extremely familiar with the MYSQL functions
I'm a little confused over why you would display the same flavor more than
once for a single item. But ok. Have you thought about populating an array
with the flavors and then retrieving flavors from the array however many
times you need to in an if statement. Maybe it would be easier to comment
So sprach »Christian Dechery« am 2001-08-27 um 22:57:49 -0300 :
phpMyAdmin is very nice...
but not even close to Mysqlfront... try it out...
http://www.mysqlfront.de/
Well, but for this to work, you either have to have a local MySQL on
your Windows platform, or the database has to be open
Try phpMyAdmin
http://phpwizard.net/
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
- Original Message -
From: Joseph Bannon [EMAIL PROTECTED]
To: PHP (E-mail) [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 6:06 PM
Subject: [PHP] PHP mysql admin?
Are there any free
Thanks. I'll give it a try.
Joseph
-Original Message-
Try phpMyAdmin
http://phpwizard.net/
- Original Message -
Are there any free PHP mysql database admin programs out there?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
yes, phpMyAdmin is the very best!
greetings,
gert mellak
==
eMail: [EMAIL PROTECTED]
http://www.mellak.com
Andrey Hristov [EMAIL PROTECTED] schrieb in im Newsbeitrag:
017a01c12f0c$3f013000$[EMAIL PROTECTED]
Try phpMyAdmin
http://phpwizard.net/
Andrey Hristov
IcyGEN
So sprach »Joseph Bannon« am 2001-08-27 um 10:06:39 -0500 :
Are there any free PHP mysql database admin programs out there?
yup, phpmyadmin. I'd recommend the newer versions from
http://phpmyadmin.sourceforge.net. It has some nice feature additions
compared to the original one.
Alexander
Yes, there is a problem.
--
SELECT *
FROM links
WHERE 1=1
and ( name LIKE %te%
OR description LIKE %te%
OR url LIKE %te% )
AND approved=1 LIMIT 5;
--
--- Jeff Lewis [EMAIL PROTECTED] wrote:
Guys, why isn't this working? :)
SELECT * FROM links WHERE name LIKE %te% OR description
LIKE
phpMyAdmin is very nice...
but not even close to Mysqlfront... try it out...
http://www.mysqlfront.de/
At 10:38 27/8/2001 -0500, Joseph Bannon wrote:
Thanks. I'll give it a try.
Joseph
-Original Message-
Try phpMyAdmin
http://phpwizard.net/
- Original Message -
Are
-
From: Christian Dechery [EMAIL PROTECTED]
To: Joseph Bannon [EMAIL PROTECTED]; PHP (E-mail)
[EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 11:57 AM
Subject: RE: [PHP] PHP mysql admin?
phpMyAdmin is very nice...
but not even close to Mysqlfront... try it out...
http://www.mysqlfront.de
Tried to download this but it bombs after about 55k of the 895k.
Seriously broken
Chris
Christian Dechery wrote:
phpMyAdmin is very nice...
but not even close to Mysqlfront... try it out...
http://www.mysqlfront.de/
At 10:38 27/8/2001 -0500, Joseph Bannon wrote:
Thanks. I'll give it a
Thank you! :)
Navid Yar
-Original Message-
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 8:58 PM
To: Joseph Bannon; PHP (E-mail)
Subject: RE: [PHP] PHP mysql admin?
phpMyAdmin is very nice...
but not even close to Mysqlfront... try it out...
http
, August 27, 2001 9:36 PM
To: Christian Dechery
Cc: Joseph Bannon; PHP (E-mail)
Subject: Re: [PHP] PHP mysql admin?
Tried to download this but it bombs after about 55k of the 895k.
Seriously broken
Chris
Christian Dechery wrote:
phpMyAdmin is very nice...
but not even close to Mysqlfront
At 4:09 PM +1000 8/24/01, Chris Aitken wrote:
Hi All,
Just a quick non-technical question.
I live in Australia and a friend of mine has a website hosted here
in Oz, and he pays his set amount per month which simply is for
Hosting, cgi-bin and log file access for his website.
Hes wanting to
Hello All,
I think for a thin page with PHP+mySQL you can go as low as
$3 a month (35MB)
I have seen decent packages, with Vserver privileges at
around $18/mnt.
--- Alnisa Allgood [EMAIL PROTECTED] wrote:
At 4:09 PM +1000 8/24/01, Chris Aitken wrote:
Hi All,
Just a quick non-technical
'order by text asc' will sort in alphabetical order A-Z
.. and your query should be select [campo] from table where campo like 'A%'
... seems like an expensive way of sorting ...
i think mysql has natural order sorting functions in there somewhere ...
Steve
Marisol díaz e. [EMAIL PROTECTED]
Erich Kolb wrote:
When you query a MySQL Database, how do you set the order
alphabetically?
SELECT whatever FROM wherever ORDER BY insert_fieldname_here
regards
Wagner
--
Madness takes its toll. Please have exact change.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
select [campo] from [tabla] order by [campo]
if you want for each leter
select [campo] from [tabla] where [campo] like 'A'
Marisol
- Original Message -
From: Erich Kolb [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 11:32 AM
Subject: [PHP] PHP MySQL
When you
What's wrong with using ORDER BY in your sql statement?
- Original Message -
From: Erich Kolb [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 9:32 AM
Subject: [PHP] PHP MySQL
When you query a MySQL Database, how do you set the order alphabetically?
--
PHP
on 7/20/01 12:32 PM, Erich Kolb at [EMAIL PROTECTED] wrote:
When you query a MySQL Database, how do you set the order alphabetically?
If it's a text field just say DESC
Susan
--
[EMAIL PROTECTED]
http://futurebird.diaryland.com
--
PHP General Mailing List (http://www.php.net/)
To
[EMAIL PROTECTED] wrote:
on 7/20/01 12:32 PM, Erich Kolb at [EMAIL PROTECTED] wrote:
When you query a MySQL Database, how do you set the order
alphabetically?
If it's a text field just say DESC
Anyone that tries would figure out, but I just wanted to clarify that what
Susan suggested will
Also, to add to this, it's worth noting that the opposite of DESC is ASC
as in Descending and Ascending order
- Original Message -
From: Steve Werby [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, July 20, 2001 9:55 AM
Subject: Re: [PHP
I'm assuming you're trying to join them and show resumeID also with this
SELECT r.resumeID,r.userID,u.location FROM resumes r,users u WHERE
r.userID=u.userID;
-Original Message-
From: Jeff Lewis [EMAIL PROTECTED]
Sent: Thursday, July 19, 2001 12:45 PM
To: [EMAIL PROTECTED]
Subject:
Yes but for the first query all I want to do is list the locations and not
multiple times
Jeff
- Original Message -
From: King, Justin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 19, 2001 1:46 PM
Subject: RE: [PHP] PHP/mySQL Query
I'm assuming you're trying
Whoops.. do SELECT DISTINCT
-Justin
-Original Message-
From: Jeff Lewis [EMAIL PROTECTED]
Sent: Thursday, July 19, 2001 1:08 PM
To: King, Justin; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP/mySQL Query
Yes but for the first query all I want to do is list the locations
The Exchange Project is by far my favorite.
www.theexchangeproject.org
- Original Message -
From: Duane Douglas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 18, 2001 2:59 PM
Subject: [PHP] php/mysql ecommerce solution
hi gang!
i'm looking for a php/mysql ecommerce
what you want to do is a join so it'd look something like this..
select teampages.ownerID, teampages.last_update, owners.teamname FROM
teampages, owners where teampages.ownerID= owners.ownerID ORDER BY
teampages.last_update DESC LIMIT 10
hopefully that will work! :)
jay
- Original
On Thu, 5 Jul 2001, Jeff Lewis wrote:
owners
-ownerID
-teamname
-more fields
teampages
-ownerID
-bio
Anyway, I'm doing a select on the database like this: select ownerID,
last_update FROM teampages ORDER BY last_update DESC LIMIT 10
The thing is, I want to get the team name from the
SELECT t.ownerID, t.last_update, o.teamname
FROM teampages t, owners o
WHERE t.ownerID = o.ownerID
ORDER BY t.last_update DESC LIMIT 10
-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP/mySQL
Jeff Lewis [EMAIL PROTECTED] wrote:
I fought the urge to post this here but have to :(
owners
-ownerID
-teamname
-more fields
teampages
-ownerID
-bio
Anyway, I'm doing a select on the database like this: select ownerID,
last_update FROM teampages ORDER BY last_update DESC LIMIT 10
On 09-May-01 Jon Haworth wrote:
snip
be sure to check for the NULL :
if (isset($amyrow[date])) {
if ($amyrow[date] == -00-00 00:00:00) {
echo no date;
} else {
echo $amyrow[date];
}
} else {
Well, it's not immediately obvious whether your date is in i, j, or f,
so let's pretend it's in date :-)
Try this:
while($amyrow = mysql_fetch_array($aresult))
{
echo /tdtdfont face=verdana size=1;
echo $amyrow[i];
echo /tdtdfont face=verdana size=1;
On Sat, 28 Apr 2001, Andras Kende wrote:
Hello,
I pull some data from mysql with the php code below.
On the date field if there is no date on mysql it displays : -00-00
00:00:00
I would like to change this -00-00 00:00:00 to no date for example..
hmm... mysql can do this, works
Take out the order by clause or chaqnge it. You can't order by a column you
aren't selecting.
- Original Message -
From: Dan Eskildsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 03, 2001 10:30 AM
Subject: [PHP] php/mySql SELECT where clause using dates.
***NEWBIE
: PHP General List [EMAIL PROTECTED]
Sent: Thursday, May 03, 2001 10:28 AM
Subject: Re: [PHP] php/mySql SELECT where clause using dates.
Take out the order by clause or chaqnge it. You can't order by a column
you
aren't selecting.
- Original Message -
From: Dan Eskildsen [EMAIL
Hello,
maybe this could help,
WHERE TO_DAYS( NOW()) - TO_DAYS( your_date_field ) = 45
py
At 04:30 PM 5/3/01 +0200, you wrote:
***NEWBIE ALERT*** (I am only very new at this)
PHP and MySQL
OK - I have a table with data and one of the fields is a Date field.
Now I would like to SELECT all
In a MySQL query you can use the LIMIT keyword, like in phpmyadmin.
Use limit 0,10 to get the first ten results in a query.
Then do the query again but use 10,10 for the limit.
The first number is the "offset", and the second one is the maximum results
to return.
That's the way most people do
Hi Jason,
Say you have a search form that says search for "searchbox" and the search
box has a variable name of "search":
?
/* Include connection details, with a variable of $connection */
if (!$page) {
$page = 1;
}
$limit = $page * 25;
$limit = $limit - 25;
$sql = "SELECT FROM table
""FredrikAT"" [EMAIL PROTECTED] wrote:
Hi!
I'm starting a news site, and I have one problem.
(not with php or mysql, workin' fine!):
1. I want my authors to be able to make the text bold, italic ++,
but I can't find anything that works.
2. The best sollution must be something similar to
"Jeff Oien" [EMAIL PROTECTED] wrote:
This code won't work. I'm trying to get an error if the username
is entered incorrectly but it won't go through the if brackets. I even
tried printing out $num and it's 0. I also tried
if ($num = "0") {
if ($num = '0') {
The single "=" sets the variable
The comparison operator is ==. = means "assign". Try:
if ($num == 0) {
foo(bar, baz);
}
AFAIK what your code means is "assign 0 to $num and then, if that worked,
print the error message."
HTH
Jon
-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: 06 April
At 11:51 AM 4/6/01 -0500, Jeff Oien wrote:
if ($num = 0) {
print "htmlerror message etc.
exit;
}
This "conditional" will always run. you are assigning $num the value of
zero within your if() statement, and that assignation actually happens, so
the result is "true" and
"Jeff Oien" [EMAIL PROTECTED] wrote:
This code won't work. I'm trying to get an error if the username
is entered incorrectly but it won't go through the if brackets. I even
tried printing out $num and it's 0. I also tried
if ($num = "0") {
if ($num = '0') {
The single "=" sets the
I think the function should be mysql_num_rows. There's an mSQL function
msql_numrows, but for MySQL it needs the second underscore in between 'num'
and 'rows'.
$num = mysql_numrows($result);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
"long huynh" [EMAIL PROTECTED] wrote:
I think the function should be mysql_num_rows. There's an mSQL function
msql_numrows, but for MySQL it needs the second underscore in between
'num'
and 'rows'.
$num = mysql_numrows($result);
Either will work. mysql_numrows() is the old name of the
Okay, with all that code, I can answer your question.
The problem here is that you only have on form field with a date. Therefore
it should not be an array.
You also have only one photono, so it too should not be an array.
When the loop iterates to create the query, there is only a value for
It is $39.95 at barnesandnobel.com and at fatbrain.com.
That GST is a killer. It will probably have an RRP around $110 here in
Australia too.
Cheers,
Luke Welling.
""YoBro"" [EMAIL PROTECTED] wrote in message
995r3k$poh$[EMAIL PROTECTED]">news:995r3k$poh$[EMAIL PROTECTED]...
I actually think
On Wed, 21 Mar 2001 14:58, Mike Gifford wrote:
Hello,
I'd like the presense or absense of information within a database to be
involved in an if statement, however I'm having trouble getting it to
work. I've set up the following:
$same_Email_query = mysql_query("SELECT Email FROM
401 - 500 of 520 matches
Mail list logo