From: Ashley M. Kirchner [EMAIL PROTECTED]
RD SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09
RD 00:00:00' AND '2004-01-04 23:59:59'
Actually sorry, inverse the seconds (put the 00:00:00 onto the lower
date, the 4th) so it encompasses the whole period. You might
Haseeb - I would look at the indexes that it requires for the select
statments, if the db isn't indexed properly, it could be just
filesorting on each select(when you query to see if the record is in the
database on the mysql server). You can find out by putting explain in
front of your select
i have index the db properly. what next??
Haseeb
- Original Message -
From: Rolf Brusletto [EMAIL PROTECTED]
To: Haseeb Iqbal [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 08, 2004 4:04 AM
Subject: Re: [PHP] Mysql Insert/Update Problem
Haseeb - I
Haseeb Iqbal wrote:
here is what i am trying to do.i have a PHP CLI script
that will open a dbx file extract records from the dbf file
one by one check is the record is already on the linux server
(mysql database). if the record is already on the linux server
then it will update the mysql
Use MySQLODBC... I use it to manage my databases through MS Access.
I haven't integrated it yet with Word, but it is my intention in the
near future.
Hope this helps.
Respectfully,
Gary
Satch wrote:
Is there any way to have a web page (PHP) that draws data from a database (MySQL) then
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP/MySQL with Microsoft Word
Use MySQLODBC... I use it to manage my databases through MS Access.
I haven't integrated it yet with Word, but it is my intention in the
near future.
Hope this helps.
Respectfully,
Gary
Satch wrote:
Is there any way
pehepe php wrote:
Do you know any mysql management programme as phpmyadmin but not works
on the server. i want to install on my PC. then i connect my database on
server from my PC at home. Do you know it?
Well, you could just run PHPMyAdmin on your own computer and just have
it connect to the
Vernon wrote:
Some one is asking me to create a sub search on a search that has already
been done. For instance, the database has 50,000 records, a user does a
search for two keywords which yielded 1700 records. They want to now filter
that list with other keywords. The logic is that searching
Vernon wrote:
The logic is that searching 1700 records has got to be faster than searching 50,000 records.
No. Not according to theory. If you want to discuss theory it will have
to be in database news group this is php.
--
Raditha Dissanayake.
LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.
header('Content-type: application/pdf');
echo result[0];
-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29
1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival
LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.
header('Content-type: application/pdf');
echo result[0];
-Original Message-
From: Larry Brown
, that would
very likely cause the pdf to not be able to be read properly.
Chris
-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:36 AM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival
Oops, my bad on the post. I am not sending
PROTECTED]
Sent: Saturday, December 20, 2003 3:49 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival
Try looking at the data that's supposed to be outputing the pdf. Something
may be failing somewhere and you might see an error message. If you don't
see any error messages and are apparently
:16 PM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival
Thanks for the help. I went through a troubleshooting phase that started
with writing the raw data from the mysql client to disk. Checking the size
it was apparent that it was much too small. I tried running my script
Subject: RE: [PHP] mysql load_file retreival
Gald to hear it works now. Are you base64 encoding it for any particular
reason? Seems to me that it would waste a lot of db space as base64 encoding
adds quite a bit to the filesize.
Chris
-Original Message-
From: Larry Brown [mailto:[EMAIL
Hi Enda,
Does your table have an index per record ?
If so, your WHERE clause could just use the index and thus be far simpler, if
A_Number is an indexed field, then
UPDATE cdr200311 SET Price=0.225 WHERE A_Number = 61210146
Alternatively, try removing the () around the WHERE
Darka
Hello Enda,
Friday, December 19, 2003, 4:32:44 PM, you wrote:
E which returns the following SQL query:
E UPDATE cdr200311 SET Price=0.225 WHERE (A_Number = 61210146 AND
E StartDateTime = 2003110216502400 AND Duration=15.0167 AND SMSDestinationName
E = '1010')
E The query executes successfully,
[mailto:[EMAIL PROTECTED]
Sent: 19 December 2003 16:39
To: Enda; Php-General
Subject: RE: [PHP] mysql update query
Hi Enda,
Does your table have an index per record ?
If so, your WHERE clause could just use the index and thus be far simpler,
if A_Number is an indexed field, then
UPDATE cdr200311 SET
of course someone can come in with a last minute flash of
inspiration!
i really really don't need this at 5:12 on a friday afternoon!
-Original Message-
From: Jonathan Wilkes [mailto:[EMAIL PROTECTED]
Sent: 19 December 2003 17:00
To: Enda
Subject: RE: [PHP] mysql update query
when you added
to go), so I wasn't really thinking when I typed it.
Honestly, a unique index may be the best bet...
-Original Message-
From: Enda [mailto:[EMAIL PROTECTED]
Sent: 19 December 2003 17:13
To: Php-General
Subject: Re: [PHP] mysql update query
I used single..
just deleted all records except 1
Jlake [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a small database that I want to display data from. in such a way
that
it shows shows in a table with the table header being the department
category and the table cells being the categories for each department. I
have no
The URL below lists all of the MySQL mailing lists. Just choose the one
that is most specific to your issue:
http://lists.mysql.com/
HTH!
--Sam
JLake wrote:
Can anyone point my to a MySQL specific SQL newsgroup. having some
problem corectly extracting data.
Thanks,
J
--
PHP
Thanks
Sam Masiello [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
The URL below lists all of the MySQL mailing lists. Just choose the one
that is most specific to your issue:
http://lists.mysql.com/
HTH!
--Sam
JLake wrote:
Can anyone point my to a MySQL specific SQL newsgroup.
Yahoo has a very active group for PHP/MySQL.
http://groups.yahoo.com/group/php_mysql/
Jim
- Original Message -
From: Sam Masiello [EMAIL PROTECTED]
To: JLake [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 1:56 PM
Subject: RE: [PHP] MySQL newsgroup
The URL
Justin Patrin [EMAIL PROTECTED] wrote
news:[EMAIL PROTECTED]
Use mysqldump in a system() call, redirect it to a temp file, then read
it back and out to the browser.
Or, you could use popen to get the output piped back into php. Make sure
to check the mysqldump options for things you need (I
On Sat, Dec 06, 2003 at 04:39:22PM -0300, Cesar Aracena wrote:
I am wondering if someone could point me to the right functions to use to
make a script to dump all the tables in a specific MySQL DB. I need this to
keep a daily backup from my site as the hackers are screwing up my site very
The thing is that I don't have phisical access to the server and it doesn't
have telnet access either. What I want to achieve is to make a password
protected page inside my site were a button is kept to start a full backup
of my MySQL DB and after clicking on it, be able to select the Internet
On Sat, Dec 06, 2003 at 06:02:40PM -0300, Cesar Aracena wrote:
The thing is that I don't have phisical access to the server and it doesn't
have telnet access either. What I want to achieve is to make a password
protected page inside my site were a button is kept to start a full backup
of my
Cesar Aracena wrote:
The thing is that I don't have phisical access to the server and it doesn't
have telnet access either. What I want to achieve is to make a password
protected page inside my site were a button is kept to start a full backup
of my MySQL DB and after clicking on it, be able to
Guess it matters on which one you want to do the date handling...php or
MySQL.
If it's PHP, I like epoch time, makes manipulating time and dates very
simple (basic math). MySQL has its own timestamp format (the guy above me
mentions it).
Whichever you feel more comfortable with.
John
Jough
Binay
If the tables for both versions are MYISAM the steps are as follows:
1. Stop mysql on both systems.
2. Copy the contents of the 3.23.37 data folder to the 3.23.58 data folder using your
OS tools (cp, file management tools, Windows explorer etc)
3. Start mysql on both systems.
HTH
Rory
Hi Rory,
- Original Message -
From: Rory McKinley [EMAIL PROTECTED]
To: Binay [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, November 28, 2003 7:30 PM
Subject: Re: [PHP] Mysql backup
Binay
If the tables for both versions are MYISAM the steps are as follows:
1. Stop mysql
Creating new databases is usually done with the mysql root account. Bad
idea to use this account in a php script.
Lists wrote:
I have a db in sql, and I need a php/mysql query/command to copy the
entire db (schema and data) to a new db. I know how to do this with a
table, but I can not
This is for an intranet application, I trust my users.
Michael
On Wed, 19 Nov 2003, Raditha Dissanayake wrote:
Creating new databases is usually done with the mysql root account. Bad
idea to use this account in a php script.
Lists wrote:
I have a db in sql, and I need a php/mysql
I don't believe there is one command that does all this, so you've already
ruled out one good option, but you can use PHPMyAdmin. Do you have
PHPMyAdmin installed on either or both sites?
Warren
-Original Message-
From: Lists [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003
Lists wrote:
I have a db in sql, and I need a php/mysql query/command to copy the
entire db (schema and data) to a new db. I know how to do this with a
table, but I can not figure out how to do this with a whole db. I also
know that I could do it using mysql dump, but I don't want to have to
Hi John,
ASAIK you are right. Michael, if you use the root account in php you
will be able to do what John says.
John Nichel wrote:
Lists wrote:
I have a db in sql, and I need a php/mysql query/command to copy the
entire db (schema and data) to a new db. I know how to do this with
a table,
Lists wrote:
I have a db in sql, and I need a php/mysql query/command to copy the
entire db (schema and data) to a new db. I know how to do this with a
table, but I can not figure out how to do this with a whole db. I also
know that I could do it using mysql dump, but I don't want to have to
On Tue, 18 Nov 2003, Lists wrote:
I have a db in sql, and I need a php/mysql query/command to copy the
entire db (schema and data) to a new db. I know how to do this with a
table, but I can not figure out how to do this with a whole db. I also
know that I could do it using mysql dump, but I
Robb Kerr wrote:
Ok, I feel like a complete bonehead because I can't seem to figure this
thing out. But, I readily welcome someone making me feel worse by pointing
out my simple mistake. I can't get DW to connect to a MySQL database on a
new server with which I'm working. I've worked with other
Hi,
it's very simple intead of using
insert into users set userPassword='123'; you say
insert into users set userPassword=password('123');
Shaun wrote:
Hi,
I am trying to make my site more secure, can anyone suggest a tutorial on
using the mySQL password function with PHP. I can't find anything
From: Raditha Dissanayake [EMAIL PROTECTED]
From: Shaun
I am trying to make my site more secure, can anyone suggest a tutorial on
using the mySQL password function with PHP. I can't find anything through
google...
it's very simple intead of using
insert into users set userPassword='123';
Hi,
Oh, and this will do almost NOTHING to make your site more secure. Why do
you think it will?
---John Holmes...
You are partly right about this we had a nice flame war about this very
issue couple of weeks ago on the jabber lists. Anyone interested in the
nitty gritty can google on the
From: Raditha Dissanayake [EMAIL PROTECTED]
Oh, and this will do almost NOTHING to make your site more secure. Why do
you think it will?
You are partly right about this we had a nice flame war about this very
issue couple of weeks ago on the jabber lists. Anyone interested in the
nitty
Shaun wrote:
Hi,
I am trying to make my site more secure, can anyone suggest a tutorial on
using the mySQL password function with PHP. I can't find anything through
google...
Thanks for your help
Not that this would make your site more secure (well, I guess it would
be more secure than plain
John Nichel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Shaun wrote:
Hi,
I am trying to make my site more secure, can anyone suggest a tutorial
on
using the mySQL password function with PHP. I can't find anything
through
google...
Thanks for your help
Not that
Shaun wrote:
John Nichel [EMAIL PROTECTED] wrote in message
snip
Not that this would make your site more secure (well, I guess it would
be more secure than plain text), but just use it in your query
INSERT INTO someDB.someTable ( username, password ) VALUES (
'{$username}',
On Thu, 6 Nov 2003 09:09:57 -0500, you wrote:
True, true. I actually use MD5() for the same reason, but, really, if
someone has access to the database to read the hashes, odds are they have
access to the rest of the database and your code. So what are you protecting
really?
Many people use the
Hey, Also the webhost only allows us database direct database connection
using phpMyadmin, I did notice that on the table that stores the info, it
keep getting an error after someone is posting the form. The error says
something about Overhead: 275 bytes, Is this just an MySQL limitation that
is
Hi,
Friday, October 3, 2003, 8:17:23 PM, you wrote:
CM ok im stumped lol i have used this code in the past to insert data into
CM mysql (im relitively new though)
CM --code
CM mysql_query(INSERT INTO Images (Image, desc) VALUES ('$name',
CM '$description')) or die (mysql_error());
CM
Thanx Tom, i should of realized that lol.
Again Thanx :)
Tom Rogers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
Friday, October 3, 2003, 8:17:23 PM, you wrote:
CM ok im stumped lol i have used this code in the past to insert data
into
CM mysql (im relitively new though)
CM
DESC is a reserved word (used to indicate a DESCending ORDER bY).
N
On Friday 03 Oct 2003 11:17 am, Cameron Metzke wrote:
ok im stumped lol i have used this code in the past to insert data into
mysql (im relitively new though)
--code
mysql_query(INSERT INTO Images (Image, desc)
Either limit your query to return only the second row ( look in mysql
manual for the limit caluse), or you will need to move the array counter
forward one for the $row_rsLastL = mysql_fetch_assoc($rsLastL)
operation.(php manual under array functions)
On Thu, 2003-10-02 at 12:10, Joe Harman
Hey Thanks Petre
Cheers... And a big brain fart
-Original Message-
From: Petre Agenbag [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 6:17 AM
To: Joe Harman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL get second row problem
Either limit your query to return
On Wednesday 24 Sep 2003 11:24, nabil wrote:
Dear all;
I have been using Mysql for a long time, but I have a benchmark Q.
Is pgsql , better ? faster ? more reliable than mysql ?
How long is a piece of string?
any comment ?
Some people say that php is not for a very big enterprise, banking
nabil wrote:
Dear all;
I have been using Mysql for a long time, but I have a benchmark Q.
Is pgsql , better ? faster ? more reliable than mysql ?
Maybe.
any comment ?
Some people say that php is not for a very big enterprise, banking ,
application !! they said that java or even .NET is better
Is pgsql , better ? faster ? more reliable than mysql ?
I won't speculate on which one is faster (although I think both camps
would claim ownership of the trump card). But Postgresql does conform
closer to the SQL standard, and there are a number of features available
in it that are not
Hi,
Thursday, September 18, 2003, 2:38:50 PM, you wrote:
CA Hi all,
CA I have a a timestamp in a DB (14 digits) that I want to display like I
CA want in my pages. I tried to use strtotime, mktime and date functions
CA with no success... it always return the current timestamp instead of the
CA
H:i:s, $date1);
Any ideas? Thanks,
Cesar Aracena
www.icaam.com.ar
-Mensaje original-
De: Tom Rogers [mailto:[EMAIL PROTECTED]
Enviado el: Jueves, 18 de Septiembre de 2003 01:48 a.m.
Para: Cesar Aracena
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] MySQL timestamp to desired date function
Hi
[snip]
I have a a timestamp in a DB (14 digits)
[/snip]
strtotime() tries to convert textual dates into a UNIX timestamp. eg 10 September
2000
since you've supplied a 14 digit timestamp to strtotime(), the function will throw
back unexpected results.
can we get some sample data from the
Sure. One result is 20030918014916. That sound like MMDDHHMMSS to me
right?
Thanks,
Cesar Aracena
www.icaam.com.ar
-Mensaje original-
De: Cody Phanekham [mailto:[EMAIL PROTECTED]
Enviado el: Jueves, 18 de Septiembre de 2003 02:04 a.m.
Para: [EMAIL PROTECTED]
Asunto: RE: [PHP
On Monday 15 September 2003 10:26, andu wrote:
I did this blog where I create a temporary table to store entries while
editing them (spell checking, preview, etc). The problem I was having is
that sometimes the temporary table is created sometimes not. For every
transaction with MySql I used
On Mon, 15 Sep 2003 22:31:08 -0500
Jackson Miller [EMAIL PROTECTED] wrote:
On Monday 15 September 2003 10:26, andu wrote:
I did this blog where I create a temporary table to store entries while
editing them (spell checking, preview, etc). The problem I was having is
that sometimes the
* Thus wrote James Hamilton ([EMAIL PROTECTED]):
[snip]
The user has both localhost and % host privileges in the mysql
permission
schema.
[/snip]
Any other thoughts?
[/snip]
current testing code:
$link = mysql_connect(localhost, user, pass )
or die(Could not
I'm trying to get the total number of a certain records from a database,
but the result is always '1'. Please advise!
=MySql Table =
=activitiy =
id | employee_id | project_id | date
1 | 45 | 60 | 2003-09-09
2 | 34 | 10 | 2003-09-10
3 | 45 | 45
[snip]
The user has both localhost and % host privileges in the mysql
permission
schema.
[/snip]
Add the same user with 127.0.0.1 as the host. Make sure you reload
(flush) the users table
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
[snip]
The user has both localhost and % host privileges in the mysql
permission
schema.
[/snip]
Add the same user with 127.0.0.1 as the host. Make sure you reload
(flush) the users table
Any other thoughts?
[/snip]
What is your connection string? (code)
P.S. Always make sure
[snip]
The user has both localhost and % host privileges in the mysql
permission
schema.
[/snip]
Add the same user with 127.0.0.1 as the host. Make sure you reload
(flush) the users table
Any other thoughts?
[/snip]
What is your connection string? (code)
current
From: James Hamilton [EMAIL PROTECTED]
current testing code:
$link = mysql_connect(localhost, user, pass )
or die(Could not connect : . mysql_error());
print Connected successfully;
mysql_select_db(name) or die(Could not select database);
print connected;
with user = null
On Thu, 11 Sep 2003, CPT John W. Holmes wrote:
current testing code:
$link = mysql_connect(localhost, user, pass )
or die(Could not connect : . mysql_error());
print Connected successfully;
mysql_select_db(name) or die(Could not select database);
print connected;
with
[snip]
On Thu, 11 Sep 2003, CPT John W. Holmes wrote:
current testing code:
$link = mysql_connect(localhost, user, pass )
or die(Could not connect : . mysql_error());
print Connected successfully;
mysql_select_db(name) or die(Could not select database);
print connected;
How did you create this new user?
Using mysql grant statements:
originally:
grant all privilges on name.* to [EMAIL PROTECTED] identified by 'pass';
grant all privileges on name.* to user@'%' identified by 'pass;
and just now
grant all privileges on name.* to user@'127.0.0.1'...
Is there an advantage or difference in running FIND_IN_SET() instead of
LIKE?
-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 5:53 AM
To: Ralph Guzman; PHP General Mailing List
Subject: Re: [PHP] mysql Pattern Matching
From: Ralph
check this out dan
It may help
http://www.mysql.com/doc/en/EXPLAIN.html
- Original Message -
From: Dan Anderson [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:38 AM
Subject: [PHP] mySQL overhead: Tweaking Scripts for Speed
I'm trying to figure
--- Dan Anderson [EMAIL PROTECTED] wrote:
I've figured out that all mySQL queries should use indexed ids for
speed. (For anyone who doesn't know: mySQL indexes fields with ...
You can create an index yourself:
KEY [index_name] (index_col_name,...)
Find more on this page:
From: Dan Anderson [EMAIL PROTECTED]
But how much overhead is there in:
$link = mysql_connect($hostname,$username,$password) or die();
$db = mysql_select_db($database,$link) or die();
Would it be beneficial to run a single one at the beginning of every
script? Currently I have a bunch of
While multiple connections will just return the first connection, anyhow,
why do the extra work, right?
Yes that was what I was thinking. But I was also thinking that I would
need to global the $link and $db variables and run mysql_query() with
them in options. So I'm wondering how much work
From: Ralph Guzman [EMAIL PROTECTED]
Is there an advantage or difference in running FIND_IN_SET() instead of
LIKE?
Actually no, I guess there isn't. Neither one will use an index.
mysql desc test;
+---+-+--+-+-+---+
| Field | Type| Null | Key |
From: Dan Anderson [EMAIL PROTECTED]
While multiple connections will just return the first connection,
anyhow,
why do the extra work, right?
Yes that was what I was thinking. But I was also thinking that I would
need to global the $link and $db variables and run mysql_query() with
them
* Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]):
From: Ralph Guzman [EMAIL PROTECTED]
Is there an advantage or difference in running FIND_IN_SET() instead of
LIKE?
Actually no, I guess there isn't. Neither one will use an index.
There will be a slight diffence in the resuls
i'm doin this offlist
-Original Message-
From: Ralph Guzman [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 10:23 PM
To: PHP General Mailing List
Subject: [PHP] mysql Pattern Matching
I know this question is best for the mySQL mailing list, but I am unable
to subscribe to
From: Ralph Guzman [EMAIL PROTECTED]
I know this question is best for the mySQL mailing list, but I am unable
to subscribe to their list at this moment so perhaps somebody here can
help me out.
I have a table with a field where amenities are listed together using a
comma delimiter like:
From: Ralph Guzman [EMAIL PROTECTED]
I know this question is best for the mySQL mailing list, but I am unable
to subscribe to their list at this moment so perhaps somebody here can
help me out.
I have a table with a field where amenities are listed together using a
comma delimiter like:
I'm not clear whether you are saying you get the records where there is a
match and no non-matching records, or simply no records at all!
What happens if you take out the WHERE clause, do you get all the records from
p being displayed with NULLs for c.projectid where no match exists?
Nick
On
* Thus wrote Anthony Ritter ([EMAIL PROTECTED]):
The following code snippet outputs a table from a mySQL database.
[snipped 255+ lines of code]
That is way to much information, please be a brief in your code
that you post. You'll find you'll get more people to analyze your
code.
Curt
--
I
From: Curt Zirzow [EMAIL PROTECTED]
* Thus wrote Anthony Ritter ([EMAIL PROTECTED]):
The following code snippet outputs a table from a mySQL database.
[snipped 255+ lines of code]
That is way to much information, please be a brief in your code
that you post. You'll find you'll get
You also asked a very, very common question, i.e. how to alternate colors
in
table rows... there are a ton of websites/tutorials out there that explain
ways to do this.
---John Holmes...
Apologies for the lengthy code.
I've tried using a few
Anthony Ritter wrote:
You also asked a very, very common question, i.e. how to alternate colors
in
table rows... there are a ton of websites/tutorials out there that explain
ways to do this.
---John Holmes...
Apologies for the lengthy code.
I've tried
Message -
From: John W. Holmes [EMAIL PROTECTED]
To: Anthony Ritter [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 9:59 PM
Subject: Re: [PHP] mysql output
Anthony Ritter wrote:
You also asked a very, very common question, i.e. how to alternate
colors
in
table
Anthony Ritter wrote:
I found the following and inserted it into my snippet for alternating
backgoriund colors.
However, I'm not sure I understand the logic.
[snip]
if ($alternate == 1) {
$color = #eaf3da;
$alternate = 2;
}
else {
$color = #d5eae9;
$alternate = 1;
}
It's just a long way of
functions you should consider:
trim
urlencode/urldecode
rawurlencode/rawurlencode
try echo '{$_GET['isbn']}' (or $query) on the result page to see what you are
truly getting. I bet the browser is encoding the variable in the GET string,
even though it doesn't appear that way to you.
I think this does what you want. You can probably extend it to do the final
check for val3 vs. val2
select distinct t1.val1, max( t1.id ), t1.val2 from table as t1, table as t2
where t1.val2 = t2.val2 group by t1.val1;
HTH
On Thursday 31 Jul 2003 3:22 pm, Petre Agenbag wrote:
Hi List
On further reflection, my first attempt works for the specific example but may
not in the general case. Try using a combination of max( ...id ) and min(
...val2 ) and add t1.val2 to the group by clause. This might work, but I've
deleted my test files now!
On Friday 01 Aug 2003 7:04 am,
select * from main
left join fof on main.id = fof.id
left join pub on main.id = pub.id
left join gov on main.id = gov.id
left join med on main.id = med.id
left join ngo on main.id = ngo.id
left join own on
Don't know whether it's just because it's late at night here in the UK or
whether I'm being a bit dim, but wouldn't it be much, much easier to store
all the data in your non-main tables in a single table and distinguish the
type of data (i.e. fof, pub, gov, etc) by a field. This would
Try something like this.
select
fof.id AS fof_id, fof.information_sent AS fof_info,
pub.id AS pub_id, pub.information_sent AS pub_info,
gov.id AS gov_id, gov.information_sent AS gov_info,
med.id AS med_id, med.information_sent AS med_info,
ngo.id AS ngo_id, ngo.information_sent AS
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=mysql+max+columnsbtnG=Google+Search
Mike Mannakee wrote:
Does anyone know what the maximun number of columns I could put in a table
is?? I can't find it in manual. Like, could I have a table with 200,000
columns?
Mike
--
PHP
You should rethink your data structure if you want to create 200,000
columns. If you need to create that many columns, chances are you are
going to need to add more periodically. That means changing your table
structure which you shouldn't have to do in a well defined schema. I'm
guessing most
* Thus wrote Phillip Blancher ([EMAIL PROTECTED]):
I am trying to count in mySQL the number of entries in the field day where day=2
or 3.
Then I want to check just to see if that returned a value greater than 0 or not.
I am using the code below, but having a problem, I keep getting 0 as
print_r($shipping3);
echo amount from DB query; echo $shipping;
?
- Original Message -
From: Curt Zirzow [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 5:23 PM
Subject: Re: [PHP] MySQL/PHP problem.
* Thus wrote Phillip Blancher ([EMAIL PROTECTED
801 - 900 of 1710 matches
Mail list logo