What's this got to do with databases (PHP-DB list)? It's barely related to
PHP to begin with. Think about where your sending your messages before you
click the button.
---John Holmes...
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004
From: Larry R. Sieting [EMAIL PROTECTED]
what would be the most efficient way to rework this data in to what I am
after
stored text:
asdf asdf sadl jf lsakdjf a \r\n asdfierw aweiufasd asiuwr \r\n
asdhfauiweuhrahsd \r\n
displays text as:
asdf asdf sadl jf lsakdjf a
asdfierw
From: Muhammed Mamedov [EMAIL PROTECTED]
Try this
SELECT DISTINCT(file_name), Count(file_name) AS cnt FROM $table_name
WHERE
date
BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by cnt;
desc
If you're GROUPing by file_name then you don't need DISTINCT(file_name)...
it's
From: Angelo Zanetti [EMAIL PROTECTED]
This might be slightly off topic but hopefully someone can help.
I have a field that is a varchar and I stored dates in it. But now I want
to
change the type of the column to date, but I have a problem that the
formats
differ:
my format: mm/dd/
From: Duane Barnes [EMAIL PROTECTED]
$output .= option value=$category$category/option;
Put quotes around your values...
If you have
option value=This and ThatThis and That/option
how do you expect HTML to know you mean This and That as you're entire
value? It's not. It's going to take This
From: Monty [EMAIL PROTECTED]
I now get an error from MySQL stating that BINARYuser_name is not a
valid
column. So, something seems to be broken. I looked through the MySQL
online
docs and BINARY is still there, but, it won't work for me.
Maybe try putting a space between BINARY and the
From: [EMAIL PROTECTED]
I have a MySQL database, with around 500 entries in one table...
I've noticed that many entries have an erroneous ';' in the one of the
fields.
What I need to do, is tell MySQL to go through the ENTIRE table and find
any instances of ' ; ' and them delete
From: [EMAIL PROTECTED]
is there a PHP function that wil return the names of the columns for a
given table?
http://www.php.net/mysq_list_fields
Note: The function mysql_list_fields() is deprecated. It is preferable to
use mysql_query() to issue a SQL SHOW COLUMNS FROM table [LIKE 'name']
From: Larry Sandwick [EMAIL PROTECTED]
I need to sum the field *COST* in this query where data in *STATUS* is
equal to HELD and OPEN, so I will have 2 totals passed below and do
not know where to begin .
SELECT status, SUM(cost) FROM Table WHERE status IN ('HELD','OPEN') GROUP BY
status
From: Larry Sandwick [EMAIL PROTECTED]
I appreciate the quick response, but I should have been more clear.
I understand the query below, but I would only have 2 total and it is
not group by the companies.
The query below gives me the main information without totals.
How do I add the 2
From: Adam i Agnieszka Gasiorowski FNORD [EMAIL PROTECTED]
I cannot use this query
CREATE TABLE table LIKE other_table;
, which is supposed to create an
empty clone of the other_table named
table.
Was it added in some later MySQL version?
It's in the manual on mysql.com, bo no version
From: Gary Every [EMAIL PROTECTED]
Try:
CREATE table new_table SELECT * from old_table limit 1;
delete from new_table;
This will give you the same structure in both tables, and the
deletion will make the new_table empty.
Not quite the same as it will not copy indexes/keys...
---John
From: antonio bernabei [EMAIL PROTECTED]
I need to make a join between two tables. And I can use the mysql_query
function: this is ok.
The problem arises because I need to apply a user defined function to a
field of one of the two tables and the rule for the join is WHERE
From: redhat [EMAIL PROTECTED]
I have a page that I put together that pulls in data for the time in
individual fields - hour, minute, am/pm, month, day. I am going to
alter the db to add year as well. I want to order this list by multiple
criteria - first by year, then by hour, am/pm,
From: "Will Contact" [EMAIL PROTECTED]
Now I am programming php+mysql. I put word, excel, mpeg and
any binaries into
the mySQL database using php on linux server,But I can take out these
binay
from mySQL database. I would like to see the files and save my pc from
From: Ruprecht Helms [EMAIL PROTECTED]
how can I convert a date stored in a mysql-database for output
in the german format (dd.mm.yy).
I tried date (d.m.y,$row-from);
but I still get the english-format stored in the database.
The databasefield is type date.
That's because date() wants a
From: Hans Lellelid [EMAIL PROTECTED]
Using MySQL DATE_FORMAT() would work, but it's a hack solution; if you
ever wanted to create an English version of your site you would have to
make changes to your data-layer queries -- and that's just not where
that logic belongs.
So use UNIX_TIMESTAMP
From: ShortStay [EMAIL PROTECTED]
How do you delete a value and key from an array? I know the value.
You need to know the key.
unset($Array[$key]);
There are various array functions that'll find the key for you if you know
the value.
Is it OK to post array questions to the db list?
Not
From: Roger Miranda (Sumac) [EMAIL PROTECTED]
Is there a way to permanently join/link two mysql tables?
Not without creating another table.
CREATE TABLE MyTable SELECT ... FROM Table1 JOIN Table2 ON ... WHERE ...
Although I have to wonder about your schema if you need to do this.
---John
From: Aaron Wolski [EMAIL PROTECTED]
I have data in a Db that looks something like:
14,[EMAIL PROTECTED],Andrew,Smith
1,[EMAIL PROTECTED],Andrew,Smith
14,[EMAIL PROTECTED],Barbara,Richardson
1,[EMAIL PROTECTED],Barbara,Richardson
The number represents a product_id that was purchased by
From: Paul Ihrig [EMAIL PROTECTED]
how weird is this
just had to uncheck allow anonymous access.
and keep checked Integrated Windows authentication
just seems a bit silly...
every thing works fine now.
Of course it works because you're now running the PHP scripts as yourself,
and you
From: Larry Sandwick [EMAIL PROTECTED]
Is there a way to run a query so that it ignores the case, and the query
is not case sensitive?
What's this have to do with PHP and what database are you using?
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe,
From: [EMAIL PROTECTED]
eregi_replace(a href=\(.+)\, a href=\\\1\ target=\_blank\
class=\down_txt\, $body);
How is that any different than just doing a str_replace() on a, though?
The str_replace() is going to be much faster than the eregi_replace()
function and href doesn't _have_ to be the
- Original Message -
From: mike [EMAIL PROTECTED]
I currently manage several websites that share the same code.
create a directory called inc in /usr/local/apache
and then add the following line to php.ini
include_path = .:/usr/local/apache/inc
I'd use a method like this, although
From: Chris Boget [EMAIL PROTECTED]
create a directory called inc in /usr/local/apache
and then add the following line to php.ini
include_path = .:/usr/local/apache/inc
I'd use a method like this, although I'd probably just use an absolute
path
instead of adjusting the include_path.
From: Adam Williams [EMAIL PROTECTED]
This is my SQL query:
SELECT seriesno, governor, descr, boxno, year, eyear, docno
from rg2 WHERE seriesno = '$_POST[seriesno]' and governor matches
'*$searchterm*' or descr matches '*$searchterm*';
Looks like you're doing the equivilent to a MySQL LIKE
From: Robert Sossomon [EMAIL PROTECTED]
I have a form that allows for an item to be entered, the other pieces
have been fixed so far that were bogging me down, but now I am looking
for a way to convert any entry in the form to be UPPER case so that when
the quote is listed, they are
From: Adam Williams [EMAIL PROTECTED]
I'm using Informix SQL.
Could have saved some bandwidth by mentioning that in the first place and
only posting to either php-general or php-db (which is more appropriate),
not both. :)
Ignore what my other posts said, as I don't know how Informix works.
From: pete M [EMAIL PROTECTED]
do not quite understand your problem.. pls post some code?
heres a small snippet that should work well...
$qry = 'SELECT `customer` FROM `customerList` ORDER BY `customer`';
$res = mysql_query($qry);
while($customer = mysql_fetch_object($res)) {
From: Boyan Nedkov [EMAIL PROTECTED]
Putting more than one table in the FROM clause means tables are joined,
then at least following problems could arise:
- using WHERE clause you can have empty recordset returned and then
COUNT conflicts with it because there is actually no any data to be
From: Evan Morris [EMAIL PROTECTED]
I have data in a database that may contain apostrophes.
Some databases use the backslash character as an escape character for single
quotes, while others use another single quote. Try your query such as:
SELECT * FROM Table WHERE name = 'o''mallery'
Instead
From: Jeremy Shovan [EMAIL PROTECTED]
All I did was rewrite it exactly the same as it was and the
parse error disappeared. I have never seen anything quite
like this before.
Seen this before. It's either the editor or a copy and paste operation
adding weird invisible characters. Major pain in
From: Peter Beckman [EMAIL PROTECTED]
I have this data:
Table Log: appid userid points datetype
Table Score: appid userid score
I want to verify that the last entry in table log of type x is equal to
the sum of the scores in table score for the same appid and userid.
Can
From: Dillon, John [EMAIL PROTECTED]
I want to show a number from a database in the format x,xxx.00 in a
textfield, then if it is changed by the user I want to post the value of
the
number to a decimal field. However, once you number_format the number it
becomes a string, and numbers like
From: [EMAIL PROTECTED]
could you cast as a float/double before inserting? $number = (double)
$string;
don't know what would happen to the comma, but i assume it would just get
removed??
Everything after and including the first non-number character would be
dropped.
So $12,000.34 would end
From: Peter Beckman [EMAIL PROTECTED]
On Wed, 5 Nov 2003, Dillon, John wrote:
I use this:
$x['funds'] = (int)preg_replace(/[\$,]/,,$x['funds']);
where $x['funds'] contains something like $3,249,555.32, and the end
result is an int of 3249555. I drop the cents... you want to keep
From: [EMAIL PROTECTED]
Unsubscribe
No thanks. I like it here.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: [EMAIL PROTECTED]
sweet. thanks for hte correction. i try, sometimes i fail. :)
But trying is half the battle. GI JOE!
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: Douglas Freake [EMAIL PROTECTED]
I need to do a loop where the mysql query starts
at the bottom and goes up, as if the data was in
reverse order. This is for building a category/
sub_category menu.
Data structure: (cat_id, cat_sub, cat_name)
sample routine:
do {
$sql = SELECT *
From: Aleks @ USA.net [EMAIL PROTECTED]
First I build my select list:
SELECT NAME=Cid size=1
OPTION Selected VALUE=All Customers/OPTION
?
While ($Site = mysql_fetch_array($S))
{
$Sid = $Site[CID];
$SName = htmlspecialchars($Site[Customer]);
echo(option
From: Becoming Digital [EMAIL PROTECTED]
php|cruise is coming this March.
Final word on this, I promise! :)
I'll be on the cruise, so I'm looking forward to meeting anyone else that'll
be there. Contact me offline if you want.
I wanted to say think you to all of those that contributed to the
From: Robert Sossomon [EMAIL PROTECTED]
And here is the additem.php file where it check for the info in the
field and it is erroring out.
It would be rather useful to know the error...
$get_iteminfo = select * from GCN_items where 'item_num' LIKE
'%$_POST[sel_item_id]%';
Take away the
From: Robert Sossomon [EMAIL PROTECTED]
The errors as it prints are:
The query I just ran was: select * from GCN_items where `item_num` =
'%fm-a294%'
The query I just ran was: Resource id #2
0
Those aren't errors; it's just what you asked the script to display. Your
query simply isn't
From: Larry Sandwick [EMAIL PROTECTED]
When I select data from my data base I have spaces on the lead side for
example the data that is stored is 33.jpg. Spaces included,
exclude the quotes, quotes are example only to show the spaces.
I would like to remove these spaces. Is there a
Use htmlentities() or htmlspecialchars()...
---John Holmes...
- Original Message -
From: Tonya [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 1:07 PM
Subject: [PHP-DB] Unique Format
PHP 4.3.3 and MYSQL
I am constructing a site for gamers that has a member
From: Kim Kohen [EMAIL PROTECTED]
I have some data from Filemaker Pro which needs to have a lot of
search/replacing done before importing into MySQL. I have used
ereg_replace
in PHP and end up with a variable holding the correct data. (there are
several hundred rows of data in the variable)
From: Rory McKinley [EMAIL PROTECTED]
AFAIK, LOAD DATA INFILE will only work off a file. So you would have to
create a temp file. Another option is to create a multiple value insert
query e.g.
INSERT INTO arb_table (arb_column_1...arb_column_n)
VALUES (arb_value_1..arb_value_n),
From: Dillon, John [EMAIL PROTECTED]
How do I get rid of the undefined variable errors I get on a new (default)
set up of Apache 1.3.28/PHP4.3.2 (without re-writing the code). It works
on
the internet on my host providers server but I am running this on
localhost.
I also get undefined offset
From: Robert Sossomon [EMAIL PROTECTED]
I am working on a quote system and have been trying to figure out how to
make them system automatically add an entire vendor or category at one
time. I can make the system display all of them and give the sales
folks in my office a chance to change the
From: Dillon, John [EMAIL PROTECTED]
Hm. Adjusted error_reporting to none. Why would I still get:
Forbidden
You don't have permission to access /method=post on this server.
--
--
Apache/1.3.28 Server at
From: Robert Sossomon [EMAIL PROTECTED]
An example is:
http://www.garlandcnorris.com/quotes/seestore.php
I have a session tracker installed on it already, but the modifying the
information (instead of remove and readding it) and adding an entire
group are pieces I am stumbling on.
So you
From: Devon [EMAIL PROTECTED]
I have been scouring the online documentation and experimenting for
hours trying to find a solution. I just can't do it.
I have two colomns of data that I am retrieving from MySQL:
SELECT id, name FROM a_table;
I just cannot figure out how to get that
From: Chris Boget [EMAIL PROTECTED]
My bad.
If MySQL had crosstab functionality, that *might* be able to help.
A crosstab is just a specifically formatted query, of which MySQL is
certainly capable of handling. I've done them in the past, but maybe you're
thinking of something more complex.
From: David T-G [EMAIL PROTECTED]
[Actually, maybe I'm just too new at this, but I
can't think of a practical example for which I would loop over $row...
Care to help me out?]
How about a dynamic query where you do not know the number of columns
that'll be returned? You would not want to use
From: Chris Boget [EMAIL PROTECTED]
From: Chris Boget [EMAIL PROTECTED]
My bad.
If MySQL had crosstab functionality, that *might* be able to help.
A crosstab is just a specifically formatted query, of which MySQL is
certainly capable of handling. I've done them in the past, but maybe
From: David T-G [EMAIL PROTECTED]
Hmmm... I suppose so, but I can't picture it. Shouldn't you always know
the DB schema and format of what you're going to get back? I can see not
knowing how many RECORDS you'll get back but I should think you would
know how many FIELDS will be in each.
From: [EMAIL PROTECTED]
And I'm trying to add a session variable to a MySQL database.
I've done this page that takes the results from a previous form...
But I get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING'
On line 83
Which is the
From: Luis M Morales C [EMAIL PROTECTED]
My Comment bellow:
On Wednesday 15 October 2003 14:38, Kirk Babb wrote:
Hi,
I'm having trouble with a query inside a function. I thought I'd
written
this so that the function would fail if email and zipcode supplied were
not
in the same row
From: Aleks @ USA.net [EMAIL PROTECTED]
I have a large text file that I am inserting into a mysql db and seem to
have a problem with
the date format. The data is currently in the mm/dd/ format.
MySQL expects a MMDD or -MM-DD format (the delimiter for the string
version can be any
From: Susan Ator [EMAIL PROTECTED]
If I have a field in mySQL consisting of a number with 8 digits a decimal
point and 4 more digits what is the field type it needs to be to sort it
numerically?
I've tried decimal(8,4) but it converts everything to .. I've
also tried float but
From: Dillon, John [EMAIL PROTECTED]
strip_tags() is used to remove HTML tags, eg for showing text on the
browser
and then sending it by plain text email or storing in the db. As a matter
of interest, how is this done using ereg_replace. I thought this would
work
^.*$, that is being with
From: Graeme McLaren [EMAIL PROTECTED]
Jason, thank you for reply. I tried switching the 1st 2 parameters in the
str_replace function so that it now looks like this:
$AddressLine1 = urlencode($AddressLine1);
$AddressLine1 = str_replace(+, , $AddressLine1);
Unfortunately as I am now
From: [EMAIL PROTECTED]
Is there a limit to the number of session variables one can create/store ?
Or is the limit imposed by the size of the file ?
Size of file is only limit, although you should impose a practical limit
yourself. If you need to ask this question, you're probably relying on
From: Robbie Staufer [EMAIL PROTECTED]
I'm writing an application that will display the contents of a db in the
browser, including the db-assigned id number. The user can then enter
the id number in a form and the browser will display the record
corresponding to that id number, with the data
From: [EMAIL PROTECTED]
CPT John W. Holmes [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Is there a limit to the number of session variables one can
create/store
?
Or is the limit imposed by the size of the file ?
Size of file is only limit, although you should impose a practical
From: [EMAIL PROTECTED]
I have a PHP GUI in which a select box gets populated by a query of a
MySQL DB for all CD's by all artists when the page is first opened. I am
now trying to implement
the same query but with a WHERE clause that filters the returned CD's to
be displayed in the same
From: Jonathan Villa [EMAIL PROTECTED]
I have several tables I want to delete as well as their reference in
another database
The query produced is this:
===
DROP TABLE xxx.zorder_47629403705b7e7f0c97387559d8c811;
From: [EMAIL PROTECTED]
I have two tables and am running a simple join between them to get
questions and their repsective response averages from a survey. The
question table has 49 rows and the Response table has 126,732. I'd like
to
cut down on the time its taking to run this specific
From: Jonathan Villa [EMAIL PROTECTED]
I have an application which creates temporary tables. My plan is to
remove them after a 24 hour period and only those which are have a
created time greater than 24 hours. That part I can do, my question is
how will I be able to run this script which
From: Jonathan Villa [EMAIL PROTECTED]
wget -q -O - www.domain.com/cron.php /dev/null
Interesting... how does this fair concerning security? So I'll have to
have this file located in my document root, is this a good thing? My
current directory structure consists of several files located
From: Ryan Marks [EMAIL PROTECTED]
Not necessarily. You can wget /path/to/file.php or my personal preference
is not to use wget, but php directly
/path/to/php/executable /path/to/file.php
Are you sure about that? I thought wget had to go through HTTP?
This didn't work for me, am I doing it
- Original Message -
From: Pat Lashley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, September 15, 2003 5:12 PM
Subject: Re: [PHP-DB] Need to Run a PHP script using CRON or ?
--On Monday, September 15, 2003 15:27:45 -0500 Jonathan Villa
[EMAIL PROTECTED]
From: David Smith [EMAIL PROTECTED]
Spychaa Wojciech wrote:
I have to do user recognizing in m php project. Simplest method i know is
to
recognize for example login name (when user is logging into his local PC)
I've tried to use $USERNAME variable but it isnt what i want because it
From: Aaron Wolski [EMAIL PROTECTED]
I really hope you don't mind the OT post but I've looked everywhere and
can't seem to find a solution to my problem.
I am passing a var in a session (not in the URL) to my secure checkout
area and it's not capturing the variable.
I know there is a
From: blond al [EMAIL PROTECTED]
I need a php editor file
thanks for help!
file:///WINNT/system32/notepad.exe
You're welcome.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: mike karthauser [EMAIL PROTECTED]
I have a course booking system that allows the client to add courses and
then specify how long they run for. The admin system I have built allows
the
client to add up to 30 dates for each instance of the course and these are
adding to a database row in
From: mike karthauser [EMAIL PROTECTED]
Thanks for this - I ended up rehashing my query to this:
?
$result = mysql_query(SELECT * FROM dates WHERE bookcode = '$bookcode'
ORDER BY date1,$db);
// loop to populate array
$myrow = mysql_fetch_array($result);
$i = 1;
while ($i = '30') {
From: [EMAIL PROTECTED]
Can someone explain to me the mechanism by which SID acquires a value?
For example,
$FOO = SID;
echo $FOO;
produces something like PHPSESSID=ade4055eef947f1a00cdb280470e859b when
IE is first opened and the page is loaded,
whereas reloading of the page produces an
From: Matt Babineau [EMAIL PROTECTED]
On Tue, 2003-08-26 at 11:21, Matt Babineau wrote:
Tough question (I think). I am pulling some numbers out of a data base,
currently they are stored in a blob. When I try to order by user_hits
desc it does a text ordering, not a numerical ordering. Is
From: Aaron Wolski [EMAIL PROTECTED]
Having a brain laps and not sure where in the manual to look and sadly I
need a QUICK solution.
I have a date formatted in a table like: 20030826132457
Now.. I went to MySQL timestamp from UNIX timestamps because I like the
readability of them when just
From: Gnanavel [EMAIL PROTECTED]
I have problem in executing linux command
$output=exec(ls -a);
echo pre$output/pre;
the above coding works, but
$output=exec(cp file1 file2);
echo pre$output/pre;
does not works. can any one help me out of this problem
Riddle me this... exec()
From: Dillon, John [EMAIL PROTECTED]
How do I avoid the problem in the subject hereto? SELECT query uses
variable in the WHERE clause. Fails on the following query:
SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's
AE Exp' AND ...
Escape the single quote with a
From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
Thanks for the feedback. This seems to have helped, but something
is still not working with the logic. Here is the updated code:
?php
while($cntr != 0) {
$cntr--;
if (($shell[$cntr] == ) || ($grp[$cntr] == )) {
echo p
From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
This isn't specifically a DB related question, but... The following
code snippet is not functioning for me. I keep receiving a parse error on
the if line. Basically I want to stop execution of this page if either
of
the conditions in the if
From: Jack van Zanen [EMAIL PROTECTED]
I have installed MYSQL 4.1 with support for derived tables. If I query
Mysql
with a query that has a subquery in the from clause it works fine. If I
now
load this query in PHP I get invalid resource error. If I change the
select
for another select w/o the
From: Moshe Weitzman [EMAIL PROTECTED]
I have looked all over the web but can't find an example *in php* for
connecting to a mysql server, selecting database(s), and issueing a query
which joins across databases. I already know the SQL required to achieve a
multiple database query. My
From: [EMAIL PROTECTED]
to my knowledge this is not possible in MySQL. There are only joins at
the
table level. I've been curious about this in the past myself, so if i'm
incorrect, i'm hoping to hear it via this post.
You can stop hoping now. It is indeed possible. :)
mysql select * from
From: Matt Babineau [EMAIL PROTECTED]
I'm trying to find things in my database that are greater then Now(),
but the date is stored in a blob (don't ask, I know :-0). Is there a way
I can do that comparison to find things that are in the future?
Option 1: Make a second column of DATETIME and
From: Jacob A. van Zanen [EMAIL PROTECTED]
You'll have to look into stripslashes function (of the top of my head)
PHP automatically puts slashes around variables
PHP automatically escapes quotes in incoming form data when magic_quotes_gpc
is enabled. If you do not want then, then either
From: Dillon, John [EMAIL PROTECTED]
While doing a cross tabulation, I've got a query which gives me a variable
number of fields:
Maybe mysql_num_fields() and mysql_field_name() will be of use, here? Check
the manual..
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To
From: Michelle Whelan [EMAIL PROTECTED]
Does anyone know what field type to use for inserting a webpage name into
a database? Example pagename.html
When I fill in the form information everything seems to insert fine, then
I do a search to see the result and nothing is there, so I check the
From: Jason Lange [EMAIL PROTECTED]
Here's my question. I'm creating a website for a weekly radio show. One
of the items I would like to store in the database is the list of songs
played in each show (there's normally between 20-25 songs per show), and
the songs will be displayed by show.
From: Matt Babineau [EMAIL PROTECTED]
For some reason my MySQL doesn't seem to be caching queries!
And you expect PHP to solve this how? Do you want PHP to cache the queries?
You must say please...
You need to set the four variables mentioned at the following URL in your
my.cnf file.
From: Matt Babineau [EMAIL PROTECTED]
Got an interesting problem! I have a list of ID's, basically things
people have viewed on my website. When I pull the viewable items from my
database, I need to be able to filter out all the ID's people have
already viewed, so that they only get a list of
From: Dillon, John [EMAIL PROTECTED]
Thanks to both responses. In fact, it decided to work once I put 0 in the
cell that 1 was to be added to! It seems it got it started.. 1+NULL=?
1 + NULL = NULL
Any math statement with NULLs in it will equal NULL. (DB wise)
---John Holmes...
--
PHP
All of the work is in the queries, so it doesn't matter that the example at
the end is in Perl.
The whole concept is that you're using SUM(IF(column=value,1,0)) to sum up
your values. To get each of the values you can run a query and use the
results of that query to build your second query with
I'd agree with what someone else said about keeping a separate table full of
possible pin numbers.
Fill it with all of the pin numbers to begin with, add in a building or
department row so you know what sequences go with what building, etc.
Then, to get a pin number for someone, you can just:
From: Aaron Wolski [EMAIL PROTECTED]
So.. do I need to use 2 different incrementors? $z and say $x for each
part?
I basically pieced this code together from several examples I found so
forgive forgive the fact I don't know a whole lot about the code even
though I've tried to understand it as
From: Aaron Wolski [EMAIL PROTECTED]
while($z++ %3 !==0)
[snip]
echo (++$z %3 == 0) ? '/tr' : '';
The first time through your code, $z is zero. Since the thread titles
don't match, your going to get to your while loop above. $z is
From: Marie Osypian [EMAIL PROTECTED]
I don't want to use the limit on this query anymore. What I want is to
display all that are dated within the last 3 months. What would be the
easy
way to do that?
SELECT federal_development_id, UNIX_TIMESTAMP(date) AS date, topic, body
1 - 100 of 143 matches
Mail list logo