Hi there,
Firstly a big thanks to those who pointed me in the direction of 'PHP-fast and
easy web development'. it was/is a great book, and I have learnt loads on the
past week.
Anyhoo...
I have a php page and included the line:
$sql = "SELECT * FROM $table_name
WHERE member =
I am a newbie, so I gotta admit that most of that went over my head, hit a brick
wall, and is now residing in the big server in the sky.
If you go to:
http://www.pcformat.co.uk
Select news, and then any article, and if you look at the URL, you'll see the
result I'm trying to achieve.
They've
'ello,
Is it Possible, in PHP to read a URL?
What I am trying to do is this...
I have many news stories in a database, and a single static news page, that
calls the story, and the corresponding headline.
I have looked about on-line, and seen a common URL,...
I hear ya.
[EMAIL PROTECTED]
03/04/2003 17:02
To: [EMAIL PROTECTED]
cc:
Subject:[PHP-DB] Anybody out there?
Is the list active? I've seen nothing all day.
Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
Pay It Forward
I wanna back up my MySQL database in preperation for this:
==
http://www.securityfocus.com/news/6219
http://www.counterpane.com/alert-t20030702-001.html
http://news.ists.dartmouth.edu/todaysnews.html#internal10656
SANS (http://isc.incidents.org/) says on site
I know I'll get flamed for askign such a simple question, but here goes...
I have a MySQL DB and wanna increment a field 'id_number' by one each
time, to avoid creating duplicates...
I've done it before, but can't remember how...
Any ideas?
Tris...
Cheers for the help on my last auto inc prob..
I checked out phpmyadmin, and I'm loving it...! cheers all
Anyway,
I want to know how to store a date like this in a MySQL database:
date(F j, Y, g:i a);
Resulting in:
July 10, 2003, 3:39 am
But what do I need to set my
Just been asked for a 'quick' job...
A mate needs a system that can upload a file, and place it in a specific
directory...
Via FTP he says, but I know there's other ways
Has anyone directions to a tutorial, or script, that can get this out of
my inbox on this hot, stuffy Friday afternoon?
Now I am not an Apache guru, and my PHP/MySQL experience is all based
around the coding side, not the instilation, security etc...
So when I arrived at work yesterday, and discovered that several databases
had been deleted, and a random database called 'sanij' has been created,
My gut was to
I know... live and learn... and learn I have...
Good advise there...
We're gonna be moving hosts in a few weeks anyway, to relieve the burden
on little me in these kinda areas...
Passwords are being changed, and patches are being checked for updates
etc...
I have full backups of the site, and
I have a table, wth many entries.
Each entry has been asigned a unit to belong to.
I want to list all the units dynamically.
How can I display all the units, without displaying each instance of the
unit?
EG:
Unititem
breakfast cereal
breakfast
My word, easy when you know how...!
Cheers mate!!!
[EMAIL PROTECTED]
07/08/2003 14:42
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] Breaking down a table field
SELECT DISTINCT(Unit) from TABLE_NAME;
I've just done a search on goolge for this, and found several products
that do it, but I'm convinced there's gotta be an open source option?
Anyone able to point me in the right direction with this?
*
The information contained
http://www.beamhost.co.uk/hosting.html
I'm moving hosts with our site at work...
I found these guys and am very impressed.
Has anyone had any dealings with them? Know if they are any good?
Tris...
*
The information contained
Hi there,
I need to take a field in my database, and remove the first 32 characters
from each entry...
There are 100's, and I know there's gotta be an easy way...
I've looked up string replace, and it only appears to work one at a
time...
Can anyone tell me how to make it accross the whole
Sorry, I'll specify...
I have one column, in a row of perhaps 4 fields.
I want to remove the first 32 characters from onlt one field
EG:
My DB:
namedateurl ip
bob 1/2/99 http:// 1.1.1.1.
sue 4/6/01 http:// 2.2.2.2
If I wanted to remove just the http bit and leave ://
I'd
Was just an examle date column ;-)
Anyhoo, jsut a note to say, it's sorted..(I did the mass replace by hand
:-( but at least it's done...
I've also sorted anotehr prob too, so all in all, a productive morning...
I jsut wish I could remember all this stuff for next time!
Ignatius Reilly
I've been building web sites that use a database backend for some time
now.
I typically use the format.
http://www.mysite.com/index.php?page=contact
http://www.mysite.com/index.php?page=home
http://www.mysite.com/index.php?page=aboutus
etc
My most recent job wants to use differnt pages, so
Probably a simple query, but gogle has turned up good, but not specific
info...
I have a data capture form, that I wanna view the results of.
All good, I've built a results page, that fitlers by many different
catagories etc...
what I'd like to do now, is have two date fields to sort by, and
Hi there,
I've been trolling through hotscripts.com etc, looking for a tool that I
can buy/download to use as a email marketing tool.
My company has requested the ability to allow users to sign up for certian
offers, news items etc, and need the following functionality:
Multiple lists, and each
I've been asked to add a field to a download capture sstem I've got.
I've two tables, one that contains all the individual files info
('single_file'), and one that records the downloads
('completed_downloads').
All good...
I've been asked to add a file_category (article, brochure, exe etc...)
I've been asked to add a field to a download capture sstem I've got.
I've two tables, one that contains all the individual files info
('single_file'), and one that records the downloads
('completed_downloads').
All good...
I've been asked to add a file_category (article, brochure, exe etc...)
Not sure if this is a MySQL Q. or a PHP one, but here goes...
I'm just learning sessions...
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
Cheers to everyone...
the curly brackets was me not thinking after a boozy lunch, and trying to
recreate code, on an E-mail..
anyhoo...
I thought the best idea, and the simplest for me, was to remove the ' from
the session recall
Turning $_SESSION['salutation'] -- INTO -- $_SESSION[salutation]
How do I unsubscribe?
I'm going away, and have set myout of office...
I don't wanna bombard you guys every time I get a posting...
*
The information contained in this e-mail message is intended only for
the personal and
I will be out of the office starting 23/10/2003 and will not return until
11/11/2003.
I will respond to your message when I return.
Please contact Fiona or Alan for any issues.
*
The information contained in this e-mail
I will be out of the office starting 23/10/2003 and will not return until
11/11/2003.
I will respond to your message when I return.
Please contact Fiona or Alan for any issues.
*
The information contained in this e-mail
I have scattered around about 100 tables a block of text...
I wasn to serach through ALL my tables, and ALL my rows for this text, adn
repalce it with another block of text.
I've searched n google for mysql multiple table update But have yet to
find an answer..
anyone know an easy way to do
All good,
I've got a loop based on all my tables... (cheers for that)
however, I still wanna look within an entry for a smaller entry..
EG:
the quick brown frog jumped over the lazy dog
I want to find and repace frog with fox but do this happens with text
all over my database.
I'll get
Hi all...
I've searched on google without luck, and so far, no luck...
I have a date field in my database, and want to select all entries in the
database from date 1 -- date 2
I'll let the user decide what dates...
Can anyone point me in the right direction as to what command I need?
Sorry to
Systems [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
22/12/2003 17:25
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP-DB] Age old - Sort between two dates...
Dear Tristan Pretty,
I have a date field in my database, and want to select all
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 them... leaving the rest of the
data
Tried that but I got an error when using PHPMyAdmin...
UPDATE risk_corpdatacapture email = REPLACE(email,';','')
just don't work???
Wll confused now, cuase that's what I tried before I posted to the list...
and you guys say it should work too...
Any other ideas?
=
Error
SQL-query :
THAT'S IT!!!
Sweet...
Xmas hangover be damned... got there in the end..!
Cheers everyone, happy new year!!!
John W. Holmes [EMAIL PROTECTED]
29/12/2003 13:11
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP-DB] Remove all instances of a
i want to be able to tally up how many comments there are for each
particular article on a page
SELECT COUNT(row_name) from your_table
so that you can tell which ones have had new comments and which havent
$today = date(Y-d-m);
SELECT COUNT(row_name) from your_table WHERE date = '$today'
Jsut
Google is not my friend today...
I have a reportng tool on a database i have, and I want to be able to
exort the selected results (I've saved the SQL query as a session variable
for ease of use)
and save that data as a csv file... with headers if possible...
Now I have found loadsa sites that
Cheers for prompt reply...
But.. what?
I need to take an SQL query, and export teh results to a csv file...
Are you really sure that simply pointing to a non existant csv file does
that?
I don't see it somehow...?
I'm sorry if I'm wrong...
Viorel Dragomir [EMAIL PROTECTED]
09/01/2004 15:50
Getting there...
That did indeed output my results to the screen...
Next steo is to output that same data to a new file...
I've done downloads on my site elsewhere, using header(), but with
existing files...
I guess I need to learn how to use fwrite?
Viorel Dragomir [EMAIL PROTECTED]
On the users computer...
When my bosses look at the reporting
tool I built.
They are gonna hit the export link,
and get directed to a page that let's them save the data as a csv file,
for use in excel.
That's the code I'm working on here
today...
ho hum... is it the weekend yet ;-)
David
Google works!!!
just found this, and it works:
On
the other side it may be better and easier to create a csv file on the
fly. Create a page, say csv-export.php, and link to it using a
href="" This way the user's browser
is tricked
that the link points to a CSV file, if it does not honor
SELECT DISTINCT(file_name), Count(file_name) FROM $table_name WHERE date
BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by ???
desc
In the above sql statement, I'm trying to achieve:
1. select all file names, between two dates.
2. list them, and order by the highest number
Ah...
you can name the count()..
live and learn, cheers dude...
brett king [EMAIL PROTECTED]
15/01/2004 11:17
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED], [EMAIL PROTECTED]
cc
Subject
RE: [PHP-DB] SQL query...
SELECT DISTINCT(file_name), Count(file_name) FROM $table_name
What's teh diffence between 'LIKE' '='
EG: SELECT FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]'
I've just purchased an E-mail marketing piece of software, and was peakign
in the code...
Found that... Never seen it before (Have I been living in a box?)
Cheers,
Tris...
I've been told by my boss, that the law has changed in relation to 'Opt
out' options on mailing lists etc...
she tells me that I have to now change all my forms to conform.
She claims that now, each time the user must click the 'remain subscribed'
link, or we have to remove them from our
Sorry, forgot to put the[OT] bit in the subject line...
CPT John W. Holmes [EMAIL PROTECTED]
20/01/2004 14:27
Please respond to
CPT John W. Holmes [EMAIL PROTECTED]
To
[EMAIL PROTECTED], [EMAIL PROTECTED]
cc
Subject
Re: [PHP-DB] Unsubscribe (mailign lsits in general) question...
Jsut a guess...
Your row has a capital 'A' in the SQL statement, and a lower case 'a' in
teh $row[] call..
does that matter?
Larry Sandwick [EMAIL PROTECTED]
22/01/2004 15:46
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
[PHP-DB] Drop down box NOT populated
I did a search on Google, and turned up a few links, but they all seemed
to be on about mail databases...
however, I need to talk to other databases...
I'm hoping that it'll be as easy as it is to talk to MySQL...
anyone got any experience in that?
Tris...
Sadly, no...
I'm totaly new to Notes, and all I know is...
1. There is a databse, that stores our events
2. I need to add/delete/edit etc these events via our web site (run with
PHP)
I take it I should totter off, and find out exactly how the database is
structured first?
I don't know squat
This problem pertains to a system that records all downloads from our
site:
I have a field in my DB, that states which business unit owns the download
that was recorded...
What I need to do for a new report, is say how many downloads were
recorded for each Business unit?
I can select the
Perfect...
I finally used..
SELECT DISTINCT(bu), COUNT(bu) FROM $table_name WHERE date BETWEEN
'$date1' AND '$date2' group by bu
(I added the Distinct(bu) bit, to label the results correctly... god I
love this list)
Have a great day!
Jason Wong [EMAIL PROTECTED]
01/03/2004 11:03
To
You know in PHPmyADMIN...
if you hav a large field, and hit browse, you only see some fo the text...
is this a PHP thing, or a MySQL thing... more improtantly, how can I do
that??
Cheers,
Tris...
*
The information contained
Perfect!
Cheers...!
Richard Davey [EMAIL PROTECTED]
04/03/2004 10:50
Please respond to
Richard Davey [EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
Re: [PHP-DB] only showing partial info of a field in mysql...
Hello Tristan,
Thursday, March 4, 2004, 10:27:34 AM, you wrote:
I simply can't get my head round this today
Probably easy, but I've been chocka, and brain is melting...
Anyhoo...
If I have a table, with say, id(unique, auto inc), name, email,
membership_type
I've listed them on a PHP page...
I want to add a checkbox to each row, so that I can select 1
wow, easy when you know how!!!
I've gone back to loads of old sites I've done, and added this...
I always freaked out before, but my current boss was stressing...
I guess presure works!
Cheers Mustafa...!
mustafa ocak [EMAIL PROTECTED]
04/03/2004 13:52
To
[EMAIL PROTECTED]
cc
Subject
Re:
Forget it!!!
I had a LIMIT 1 in my code from an earlier test...
I AM A MONKEY!!
Laters...
Man, it just aint my day...
I have a page, that lists all entries from my MySQL database.
I've used the multiple delete script Mustafa gave me earlier, but one one
Cheers, I'll swing by php.net to learn about these functions...
Tris...
Jason Wong [EMAIL PROTECTED]
05/03/2004 10:42
To
[EMAIL PROTECTED]
cc
Subject
Re: [PHP-DB] Forms and more forms?
On Friday 05 March 2004 17:10, [EMAIL PROTECTED] wrote:
TO enable multiple deletions, I must place
Cause I care, here's a suggestion...
On any drop downs, add an onmouseout event in javascript.
I put together a really simple example, I'm sure you could change it to be
more usefull for multiple scoll boxes..?
http://www.beertastic.co.uk/matthew.html
Good luck...!
Tris...
matthew perry
I use PHP/MySQL daily..
love it, live it breath it...
However, I've been given a one page project to do, that needs to add the
contecnt of a form to an mssql database...
I'm fine with doing all the page, apart from talking to mssql... how
drasitally does this differ from the standard mysql
I'm trying to split up a field from a database that contains a list of
No's (Eg:1, 4, 12, 32)
If I do:
$bands_array = explode(,, 1, 4, 12, 32);
I get the following array:
$bands_array[0] = 1
$bands_array[1] = 4
$bands_array[2] = 12
$bands_array[3] = 32
All good!
However...
Calling froma
HH, didn't work...?
Mikhail U. Petrov [EMAIL PROTECTED]
18/05/2004 16:20
Please respond to
Mikhail U. Petrov [EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP-DB] explode() and a database call...?
Hi!
You should use $row[bands].
But maybe it's only
: [PHP-DB] explode() and a database call...?
Tristan Pretty [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
.
com...
HH, didn't work...?
Please echo out $row['bands'] and post the contents.
Regards, Torsten
Mikhail U. Petrov [EMAIL PROTECTED]
18/05/2004 16:20
Please
Right, todays fun dilema... ;-)
I've a user capture system set up for downloads on our site.
Each time a user downloads a file, their info is captured (so we'll have
multiple entries for each email address).
Also in the table, is a field to state if the result has been viewed by my
boss. (Just a
Kinda, but I just wanna count how many views in total...
Hence my $row1++; bit...
I'll have a play with your code though...!
Cheers,
Tris...
Daniel Clark [EMAIL PROTECTED]
03/06/2004 14:28
Please respond to
Daniel Clark [EMAIL PROTECTED]
To
[EMAIL PROTECTED] [EMAIL PROTECTED],
[EMAIL
Nope...
HHmmm, this is really getting to me...
I can do distinct, I can count, but I can't combine the two?
Can't be that hard ;-)
Daniel Clark [EMAIL PROTECTED]
03/06/2004 16:49
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Daniel Clark [EMAIL PROTECTED], [EMAIL PROTECTED]
Finally got it!
Cheers for all your help...
it was the group by Emial that was the clincher...
I didn't know that it acted like distinct()
Live and learn...!
Cheers everyone!
Gavin Amm [EMAIL PROTECTED]
04/06/2004 00:16
To
[EMAIL PROTECTED]
cc
Subject
RE: [PHP-DB] Multiple SQL
Hi there...
I'm trying to create a MYSQL query that does the following...
I've a table that lists ALL downloads from our site.
so I may have the same user many times, but different files, or infact,
same user, same file.
What my boss wants to see is:
If a user downloaded a file 3 times, she
It really is that simple?!?!?!
Wow...
I need to do a MySQL course...
Jonathan Haddad [EMAIL PROTECTED]
07/06/2004 13:39
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP-DB] DISTINCT and multiple results...
select distinct email, username from table
On Jun 7, 2004, at 8:19
Ah, but then how can I select other info from the same table (title, first
name, company etc...)
Jonathan Haddad [EMAIL PROTECTED]
07/06/2004 13:39
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP-DB] DISTINCT and multiple results...
select distinct email, username from
I have a system that tracks downloads, capturing loadsa info, but of
interest here, is email and filename.
Simply put, I wanna show all results where file name AND email are unique.
(so if email '[EMAIL PROTECTED]' has filename 'word.doc' 5 times in a table,
I want to only see it once.)
What am
I have a system that tracks downloads, capturing loadsa info, but of
interest here, is email and filename.
Simply put, I wanna show all results where file name AND email are
unique.
(so if email '[EMAIL PROTECTED]' has filename 'word.doc' 5 times in a
table,
I want to only see it
Hi there...
I'm trying to select all records from a MySQL database, and exclude those
from certain countries...
I've posted a copy of an SQL statement I've got that I'm using in
PHPMyADMIN.
And as you can see, I've said not to pick Argentina, but there it is???
What first year mistake am I
I recently saw a job that I thought I'd be good for, so they sent me a
test...
All good.. but I realised that I couldn't do it..
I got sooo damned close, but could not finish... :-(
Anyhoo, here's the test:
http://www.beertastic.co.uk/test_problem.zip
And the test parameters are below
If anyone
No offence taken!
I've never had to use JOIN before...
and the test was supposed to take an hour.. I didn;t wanna cheat... and it
took me ages to even realise what I was supposed to be doing...
(Plus [EMAIL PROTECTED] hungover :-( )
Anyhoo, I'll try what you've suggested...
Cheers.. we live,
Right
Not married... Not as great a PHP/MySQL developer as I though...
Alot of nots today... :-(
I'll take a read or that link...
This time next year, I'll be a professional...! (what, I don;t know..)
Brent Baisley [EMAIL PROTECTED]
01/12/2004 15:10
To
[EMAIL PROTECTED]
cc
[EMAIL
Bloody marvelous...!!!
Many thanks.. I'll set myself a few challenges, and see what happens...!
Cheers,
Tris...
Gryffyn, Trevor [EMAIL PROTECTED]
01/12/2004 15:47
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
[PHP-DB] Basic JOIN tutorial - RE: [PHP-DB] Job interview test - I give
Hi all, long time no post...
I've rebuilt a download tracking system my company uses.
I built the original, and thought that a restructure would be a doddle!
Ooops! ;-)
Anyhoo...
I used to capture each download in it's own row, replicating user data
each time.
(Eg: if a user downloaded 5 files,
Cool. cheers for the quick responce...
Well, my flatmate is one of two, I live with a lesbian couple in London...
One is a falsh guru, sho recently got into PHP (she's a REAL brain box,
and picsk stuff up sooo much quick than us mere mortals!)
Hard life init ;-)
Anyhoo, my prob, in more detail,
All good...
I've beenm chattingto the people who will be using the system, and think
I'm gonna do a phase 1, then 2 etc.. with phase 1, being just a simple
search option, and add mor elater...
Keeps the masses happy, and gives me more time...
still need to sort out my prob though :-(
CHeers for
I need to search an entire table for a value, and then report back what
field it was found in... how on earth do I do that?
I've a list of departments, as field names.
whenever a user interacts with that Dpet, I wanna add thier id No to the
appropriate field.
so I'll be left with a table that
that's a fine idea!
I'll hve a play...
Cheers...
Martin Norland [EMAIL PROTECTED]
06/04/2005 14:51
Please respond to
php-db@lists.php.net
To
php-db@lists.php.net
cc
Subject
Re: [PHP-DB] find a value in entire table...
[EMAIL PROTECTED] wrote:
I need to search an entire table for a
80 matches
Mail list logo