e field (I suppose you need to do this to, othewise you'd store your
numerical data in another column) like so:
Russ|27|6|Michell (stored as a single string in your table)
This is my first name, age, height, and surname respectively.
You could then just use the explode() function to remove the
th it..";
}
else
{
echo "This aint a number so it must be a string, so do stringy
things with it...";
}
Any good?
Russ
-Original Message-
From: Matthew Nock [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 1:00 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Co
sweet-as
Russ
-Original Message-
From: Matthew Nock [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 1:15 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Converting values from text to numerical
Hi Russ,
thanks for the reply ... if that will evaluate whether a (in this case
Seth:
You should have another colon ' : ' after your alnum expression:
if(ereg("[[:alnum:]]+", $textandnumbers, $numbers)) {
print("$numbers");
}
I'm not sure but you also may want to lose the double quotes or maybe
escape them.
Good luck.
Russ
--
}//end if
}//end while
$select .= "\r";
return $select;
}//end function
All the best.
Russ
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 3:38 AM
s content as a valid date simply an
integer (that we modify for display using PHP)
Does anyone know of a way (kludge or otherwise) I may be able to perform
such an ORDER BY, so that the dates in an HTML display table column are
ordered AS dates while using an INT field format??
Cheers folks.
Russ
George:
Thanks for that. That's pretty much what I realised anyway, while
composing the email. But I thought I'd send it off anyway!
Thanks a lot.
Russ :-)
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 05, 2002 2:52 PM
To: PHP DB Maili
Stick a '@' in front of the function/statement generating the error:
@unlink("$filname"); for example...
Russ
-Original Message-
From: Gabor Niederlaender [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 5:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB
Hi all:
I have a simple MySQL SELECT query:
Mr Russ Michell
Web Applications Developer
Itomic.com
Email: [EMAIL PROTECTED]
Tel: +61 (0)8 9321 3844
Fax: +61 (0)8 6210 1364
Post: PO Box 228, Innaloo, WA 6918, Australia
Street: Suite 24, 158 William St, Perth, WA 6000, Australia
&qu
I think I need to use some kind of COUNT() but am unsure how to deploy
it.
Can anyone help me out?
Cheers.
Russ
Mr Russ Michell
Web Applications Developer
Itomic.com
Email: [EMAIL PROTECTED]
Tel: +61 (0)8 9321 3844
Fax: +61 (0)8 6210 1364
Post: PO Box 228, Innaloo, WA 6918, Australia
Stree
- and you really don't wanna know what "RTFM" means but you
could find out at:
http://www.astro.umd.edu/~marshall/abbrev.html#R
Russ
-Original Message-
From: José Moreira [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 11:19 PM
To: 'Martin Clifford'; P
as less code as
possible:
echo("" .
$scoutbio . "");
}
//4). Complete your HTML :
echo "
";
I'm not sure the syntax is 100% correct - best check out the manual eh?
;-)
HTH Russ :-)
-Original Message-
From: bo [mailto:[EMAIL PROTECTED]]
Sent:
In MySQL - SQL you can't use the column alias ('score' in your case)
until after the query has been executed.
There is a workaround though - see:
http://www.sitepointforums.com/showthread.php?s=&postid=501671 for more
info.
Cheers.
Russ
-Original Message-
From:
f the field in which email addresses
are stored in your DB:
@mail($email,$from,$subject,$body);
}
or am I missing something??
Russ
-Original Message-
From: Bartek Pawlik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail problem
Just looking at our php.ini file and we use an external machine to send
mail with when calling the mail() function.
I think you just need to change the directive for the path/URI to the
mail server you wish PHP to use, in your php.ini file.
HTH :-)
Russ
-Original Message-
From: Bartek
ORDER BY RAND()
Russ
-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 1:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Random
In article <003601c241ad$225775e0$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> can someone h
n
as far as the wrong results are returned. MySQL doesn't throw up an
error either.
I'm using MySQL 3.23.49-nt-log. Can anyone enlighten me please ??
Cheers
Mr Russ Michell
Web Applications Developer
Itomic.com
Email: [EMAIL PROTECTED]
Tel: +61 (0)8 9321 3844
Fax: +61 (0)8 6210 1364
Cheers for helping me out guys.
It proved to fiddly and kludge-like to do what I wanted in SQL (I'll
wait until MySQL 4 stable version is about)
So I did some stuff with PHP arrays which worked fine.
Thanks a lot anyway.
Russ
-Original Message-
From: Ignatius Reilly [mailto:[
Chip:
Just use the names of the fields as the values too:
HTH :-)
Russ
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 1:58 AM
To: PHP_DB
Subject: [PHP-DB] keeping form field data when reloading a form
I have my email checker
e is empty)??
Thanks a lot for your help. :-)
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 24, 2002 12:12 AM
To: Russ; [EMAIL PROTECTED]
Cc: Ross Gerring
Subject: Re: [PHP-DB] auto_increment problem???
Russ,
Check your docs to confirm this,
$mailTo = "[EMAIL PROTECTED]";
$mailFrom = "From:[EMAIL PROTECTED]";
$mailSubject = "This is an email...";
$mailBody = "This is a message";
@mail($mailTo,$mailFrom,$mailSubject,$mailBody);
Try this, it works for me ;-)
Russ
-Original Message-
Fro
Oops! wrong order of arguments...
I meant:
$mailTo = "[EMAIL PROTECTED]";
$mailFrom = "From:[EMAIL PROTECTED]";
$mailSubject = "This is an email...";
$mailBody = "This is a message";
@mail($mailTo,$mailSubject,$mailBody,$mailFrom);
Russ
-Original
e OK too, and fairly simple to deploy, just make sure you
kil off the session each time a new order instruction is given.
I havn;t used cookies yet, so consult php.net for that one, but I would
have thought that a little overkill! ;-)
HTH :-)
Russ
-Original Message-
From: Achilleas Mar
e of these, but have mislaid it. Perhaps you could ask
for one here or go looking at hotscripts.com.
Hope that's of some help...
Russ
-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 3:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] douplicate e
$val";
}
:-)
HTH
Russ
-Original Message-
From: Smita Manohar [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 12:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] How to pass multiple checkbox values thru form??
hii
i have one form in which i print records from mysql datab
WORD 'your password'
mysql>FLUSH PRIVILEGES;
To try and elicit more help, I would suggest you start off every
request for help by stating you platform, and versions of software that
you are using.
Regards:
Russ
#---#
ball, golf
(separated by commas)
A user should be able view all table entries relevant to him if his
[potentially] multiple entries match those in the DB table. (above)
Are there any specific php + SQL techiques for this? has anyone else
come across a solution to this on their web-travels?
Che
A don't mess with php/mySQL/apache individually!!
go to http://www.phpgeek.com/phptriad.php
phptriad is pretty much self explanatory - You get apache/MySQL/php4
for WIndows. It's so easy to install even I managed it!
Good l
When you say integral editor of DW, do you mean, the 'hit F10' editor?
I use EditPlus, (www.editplus.com) it is preconfigured to recognise and
highlight php code as well as javascript etc and what have y
s, F6 library etc - sadly no longer..
Russ
#---#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic Uni
u see what
the weather is like in Colombo! ie not very useful!!
Russ
#---#
"Believe nothing - consider everything"
Russ Michel
coming!
cheers.
Russ
#---#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic
so: mysql_x() instead of:
mysql_x () (loose the gap!)
Hope that helps somewhat! ;)
Russ
#---#
"Believe nothing - consider everything"
ems to accept a
single primary key for a single table.
Any advice or other methods I could possibley employ, are most welcome.
Regards:
Russ
#---#
ighly reccommend it. I
also has a good Appendix of MySQL/PHP functionality + onlineplaces to
visit for extra help.
Julie's website is thickbook.com and look for the section for the book
(above).
ISBN: 0-7615-3055-X
Price US$24.99
Can$ 37.95
GBP£18.99
Or just look for the above title on
"d M Y",$stampeddate); //Use php date function and args' to print in
more useable format
HTH :)
Russ
#---#
"Believe nothing - consider everything"
whatever
criteria it is you are using.
HTH :)
Russ
#---#
"Believe nothing - consider everything"
Russ Michell
Anglia P
Sure:
while($row = mysql_fetch_array($result)) {
$usrLevel = $row['userlevel'];
$member = $row['member'];
$pswd = $row['pw'];
}
//end -while loop
Now $usrLevel, $member and $pw are available as variables taken from
this array to use as you please in you
Try:
"SELECT * FROM $table WHERE yourfield = '$somevar' ORDER BY
someotherField";
HTH :)
Russ
#---#
"Believe noth
Index index.php3
DirectoryIndex index.phtml
HTH :)
Russ
#---#
"Believe nothing - consider everything"
Russ Michell
Ang
Ummm a bit more info on your part may be helpful for folk to help
you
Like in what context your problem lies, using which system and what it
has to do with Databases working with PHP
Russ
:
#
AddType application/x-httpd-php-source .phps
AddType application/x-tar .tgz
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
HTH :)
Russ
7;building up the varuable:
$display_this .=
"
";
}
endfor;
//Echo thwe variable to the page
#---#
"Believe nothing - consider everything"
ich they
//shouldn't have)
And given mysql_connect all 3 arguments it should have to make a
successful connection to your database server. (Not sure wether you
missed these out simply for clarity though)
Hope that all helps and makes sense!!
Cheers
Russ
he lines past where it expected a
semi-colon and finds incorrect syntax. (Due to lack of said-semi colon)
Go check it out!
HTH :)
Russ
#---#
Hi there: What about doing it like this:
#---#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic
what I'm off to do now
Russ
#---#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytec
;
}
//Print $color to page:
$connection = mysql_connect("localhost","user","pass") or die("Died at
connection.");
$sql = "SELECT * FROM user_prefs WHERE u_id='$UserID'";
$result = mysql_db_query($sql, $connection) or die(&quo
n has been recorded succesfully!";
}
//end-while
HTWI (Hope That Was Informative) - New FLA (Four Letter Acronym)
Russ
#---#
"Believe nothing - conside
I may be semi-new to this MySQl lark but I'm sure auto_increment starts
at 0.
Russ
#---#
"Believe nothing - consider everything"
I use MySQL 3.22.23 but I just had a hunt about on the web and I found
a posting that confirmed your findings - I.E: auto_increment starts at
1!!
I stand corrected!
Russ
#---#
"Believe no
ay($result);
$id = $myrow['id'];
$title = $myrow['title'];
$body = $myrow['body'];
$myvar = $myvar . "";
}
HTH ;-) Russ
#---#
"Believe nothing - con
Not too sure if this is what you want, if not - I'm sorry:
>$some_number = $mysql_num_rows()
sizeof()
This counts the number of elements in an array..(Just wipped that outta
the open page in "PHP Fast and E
ider everything"
Russ Michell
Anglia Polytechnic University Webteam
http://gertrude.sipu.anglia.ac.uk/webteam
[EMAIL PROTECTED]
+44 (0)1223 363271 ext 2331
Using PhpMyAdmin click the 'empty' hyperlink. This will empty all the
data from the table but not delete the table.
HTH :)
Russ
#---#
"Believe nothing - cons
ECT DISTINCT type, id, staff_member, class, manufacturer, model,
description, picture, created, modified, published FROM equipment WHERE
class = "microphones";
I just got the exact same answer as if i would have done this:
SELECT * FROM equipment WHERE class = "microphones";
so
Perfect!
Thanks. I'm still trying to get a handle on the GROUP BY command. It's still a
little bit like magic to me. And in the manual, they don't really show how to
use it like the way I wanted to use it.
Thanks again,
russ
On Monday 12 August 2002 01:27 pm, Dan Koken wrote:
&g
value of 'big'
HTH ;-)
Russ
#---#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic Universi
ting and updating results, use and not and use a bit of
Javascript:
Good luck!
Russ
#---#
"Believe nothing - consider everything"
for a good 5 seconds longer.
This is nothing to do with loading graphics as there are non on the
page as yet, so I assume it something to do with my connection. Do I
have to explicitly state a close connection to MySQL??
Cheers
Russ
Cheers Ben.
However if I close a connection, how is it possible to reconnect if the
connection needs to be reused, i.e if further DB data is requested? Is
it just a matter if refreshing the page and it all resets??
Russ
fix it.
Cheers for your ideas folks.
Russ
#---#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic Un
losed tags??
Cheers for that.
Russ
#---#
"Believe nothing - consider everything"
"Web Developers do it on-the-fly."
constructed...
Can anyone with even slightly advanced (over me) SQL knowledge help me
out??
Many thanks!
Russ
#---#
"Believe nothing - consider everything&qu
Sweet!!
Many thanks!
Russ
#---#
"Believe nothing - consider everything"
"Web Developers do it on-the-fly."
Okay boys easy now - let's just get on with what we know best eh?? -
developing.
Russ
#---#
"Believe nothing - consider everything"
"Web Develop
doesn't exist or the
result is empty.
*/
I have also tried doing:
$num = mysql_num_rows($chk_result);
if($num != 'y') {
$chkbox = "";
}
else{
$chkbox = "";
}
//Bu
Thank Johannes!!
I'll give that a go!
Cheers - Russ
#---#
"Believe nothing - consider everything"
"Web Develop
Make sure you have nothing between your 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]
Do you mean like:
The script this value gets passed to will now have available the
varible: pswd with a value of the password field..
???
HTH :-)
Russ
#---#
"Believe nothing - consider every
Ok fair play -
What about using sessions then:
simply place the code between the at the top of each page
you wish the password to be available on.
Hope that helps...
Russ
#---#
"Believe no
t $sqlstmt;
$result=mysql_query($sqlstmt);
# print $result;
$row=mysql_fetch_array($result)
That way if an error existed somewhere B4 then it'd go..
Sorry if that was next-to-useless.
Russ
#---#
users progress throughout the site.
if(!empty($yourvar)) {
session_unregister('yourvar');
}
Hop this is of some use to you!
Regards:
Russ
#---#
"Believe nothing - cons
27;put it' in a new table
* Use useful and memorable names for your tables and table columns
I do:
tablename_colname
Good luck!
Russ
#---#
"Believe nothing - consider everything"
HaHa!! I'm just sorting that one too:
Try:
$sender = "[EMAIL PROTECTED]";
mail("$mail_to","$subject","$body","From: $sender");
That should do it...
Also check out the threads on phpbuilder.com:
http://www.phpbuilder.com/forum/read.php3?
I don't know how you're operating your PHP system but can you not
simply have an email form field??
Russ
#---#
"Believe nothing - consider everything"
"We
ySQL installation.
Does anyone have any views on this problem or has anyone any
whole/partial solutions to point me in the right direction??
I am using php4.0.3pl1 with MySQL3.22.32 on RH6.1
Any help would be very much appreciated.
Kind regards:
Russ Michell (APU Webteam)
#-
>sportdb.table_name.username_field = mysql.user.User
Do I not need to define for php what 'mysql' is, as I've done for
'sportDB' ?? and is there any specific sort of JOIN I need to do??
Many thanks for your p
one tell me what is wrong with this query (I may have missed
something - but then that shouldn't surprise as I've been staring at it
for 3 hours...;-)
Cheers:
Russ
#---#
"Believe nothing -
||
($sortedBy == 'Oct') || ($sortedBy == 'Nov') || ($sortedBy == 'Dec')
)
{
$sql = "SELECT * FROM $table_cal WHERE item_activity='$id' AND
DATE_FORMAT('item_date','%b')='$sortedBy'
the name of the column 'yourcolumn' and $var to the
variable and column names you want to be pulled from the database.
Good luck and happy coding! :-)
Russ
On Thu, 26 Apr 2001 20:16:38 +0200 ns
<[EMAIL PROTECTED]> wrote:
> hi
> i got to have data from mysql database to d
le
same-name users/pswds but with different data,
such as 'affiliation' as above for example??
Please help - as I have nearly completed the projectjust some fiddly lil' things
need to be sorted..
Many thanks.
Russ
#---
> I'd like to have some kind of a GUI on the internet
Could you not use phpMyAdmin??
Download it for free from http://www.phpwizard.net/projects/phpMyAdmin/
Cheers.
Russ
On Thu, 3 May 2001 15:43:11 +0200 Nils Wetterich <[EMAIL PROTECTED]> wrote:
> Hi NG
>
> Now that I
> I remember, that I saw somewhere some prepared package for very fast and
> comfortable installation of these three at once. Don't you now where I
> can find it? Thanks
I think you wanna be going to:
http://www.phpgeek.com/phptriad.php
Good luck!
Russ.
On Fri, 4 May 2001
> What is the best way to create True\Flase field in mysql ??
Use the 'ENUM' Field type.
http://www.mysql.com/doc/E/N/ENUM.html
Russ
On Thu, 10 May 2001 11:43:01 +0300 "DesClub.com" <[EMAIL PROTECTED]> wrote:
> hi all ..
> What is the best way
ine - in Linux you can type mysql -p
anywhere at the shell prompt (if you installed it to run in the
background as a 'deamon') and it'll prompt you to type a username and a
password.
Take care to remember these as it's v.hard to recover when you loose
these (I know 'cos I
es take some arguments, therefore the error
message: "Warning: No MySQL-Link resource supplied " means that php was
expecting arguments for mysql_close() and was given none.
HTH
Russ
On Thu, 10 May 2001 07:56:07 -0500 "Rankin, Randy"
<[EMAIL PROTECTED]> wrote:
> Is
Could you not use :
or(header("Location: local/or/absolute/path/to/exit_script.php"));
In the exit_script.php do [embed] some perl stuff - (Soz a bit vague,
but you get the idea)
Hope that is of help - if not, then feel free to call me 'dumbass' ;-)
Cheers.
Russ
On Thu,
n the row where the date lies in your table. A
MySQL TIMESATMP comes in the mmdd hh:mm:ss formate, and changes
whenever that field ia altered or updated.
Hope that is what you needed!
Russ
On Sat, 12 May 2001 18:27:36 + vipin chandran
<[EMAIL PROTECTED]> wrote:
> Hi,
> How
Maybe this is what you wanted:
");
$i=10;
for ($j=0;$j<3;$j++){
echo $j;
echo("");
}
echo("");
echo("");
echo("");
?>
The value of '$i' can now be picke
I don't use PostgresSQL, but the SQL can't be that different:
INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 =
'$z'
//Loose the brackets after the WHERE clause, and add single quotes
//around your variable.
Russ
INSERT INTO
Sorry, no news items.";
}
//and:
if($num != 1) {
$display_news = "Sorry, no news items.";
}
As I seem to remember the former working fine...now I have to switch to
the latter???
Cheers.
Russ
#---#
ss posting but this is a pressing matter,
that requires I find a pointer to a solution, or an actual solution
as fast as I can!
Kind regards:
Russ
#---#
"Believe nothing - consider everything"
mysql_result() is used when you know the row number of the item you
want to retrive from your table.
mysql_query() is used to get all results from a query, so you can loop
thru an array of them or something.
Russ
On Wed, 23 May 2001 18:47:22 +0200 Johannes Janson
<[EMAIL PROTECTED]>
es between the
datatypes that are and are not returned? Compare them and try altering
the differences you find to see what happens.
Good luck!
Russ
On Wed, 20 Jun 2001 13:17:23 +0800 Jennifer Arcino Demeterio
<[EMAIL PROTECTED]> wrote:
> Thanks for all your answers, but, they still
27;.
I honestly cant remember how I set it all up originally, but you
could go try: www.mysql.com/doc/P/r/Privileges.html and see if that
helps.
Cheers
Russ
On Wed, 20 Jun 2001 22:38:20 +0700 andRie Is <[EMAIL PROTECTED]>
wrote:
> Hello php-db,
>
>
LL auto_increment,
name varchar(25) NOT NULL,
dept varchar(25) NOT NULL,
abstract mediumblob NOT NULL,
submitDate datetime DEFAULT '-00-00 00:00:00' NOT NULL, // The
//bit you need
scale varchar(7) NOT NULL,
PRIMARY KEY (id),
UNIQUE id (id)
);
HTH !!
Russ
On W
U I might be missing something but isn't it something like:
$emailVal = "mailto:"; . $email . "\">" . $email . "";
HTH :-)
Russ
On Thu, 21 Jun 2001 00:05:46 -0500 DanielW <[EMAIL PROTECTED]> wrote:
> Greetings.
>
> Can any
the offending code to the list and I'll see if I can help out.
Russ
On Thu, 21 Jun 2001 12:03:26 -0500 Carlos Estala
<[EMAIL PROTECTED]> wrote:
> ! Hi ¡
> i have redhat 7.1 and php 4.0.4 but i have a problem with conections
> becose send me this messages "1 is not a valid P
d incorrectly.
Russ
On Thu, 21 Jun 2001 23:30:03 +0200 Tom=?ISO-8859-1?B?4XMgR2FyY+0=?=a
Ferrari <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I updated php to version 4.0.5 and MySQL to version 2.32.39, had errors
> on lines like this:
>
> $rows = mysql_num_rows($res
1 - 100 of 193 matches
Mail list logo