ported extension for newer versions, so
am trying to rewrite the code to use mysqli_connect. For what it's worth,
mysqli_init() also produces "Call to undefined function mysqli_init()" in my
error logs.
Thanks again,
Ben Miller
--
PHP Database Mailing List (http://www.php.net/)
ini,
/etc/php.d/mysqli.ini.. /etc/php.d/pdo_mysql.ini
Is there something wrong with the installation of PHP/MySQL?
Any help would be greatly appreciated. Thanks,
Ben Miller
stated that join queries in phpMyAdmin were a security hazard.
Do you know if such a security hazard exists?
Regards,
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ords that GROUP BY is gathering together in
each row (and therefore all the records that COUNT() is counting).
I'm wondering if some sort of timezone discrepancy is maybe causing a timestamp
record to be attributed to 2009-07-28 unexpectedly.
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a mysqlism :( It's not portable to other db's (apparently it's
> not part of the sql-spec).
I think I've even seen MySQL reject it in some cases.
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ur so I don't like to draw too many conclusions from what it doesn't
support.
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
le.
BTW, mysql_fetch_assoc() returns an array, not an object, so you'd need to use
this syntax:
$row['column']
As opposed to:
$row->column
If you prefer the latter syntax, you can use mysql_fetch_object().
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
rstanding, you might try the
O'Reilly book called "Learning SQL":
http://oreilly.com/catalog/9780596520830/?CMP=AFC-ak_book&ATT=Learning+SQL%2c+Second+Edition%2c
Someone else here might know of some good online resources. I've not seen any,
but then I haven't spent
ttp://stackoverflow.com/questions/946214/one-sql-query-or-many-in-a-loop
The user whose answer is marked as the correct one ("Quassnoi") also writes a
helpful blog on SQL. You should be able to find the blog by clicking on the
username.
Ben
--
PHP Database Mailing List (http://www.php.
_lastName]";
$query = mysql_query("INSERT INTO customers (`cust_first`,`cust_last`)
VALUES ('$firstName','$lastName')");
Ben Miller
-Original Message-
From: Ben Miller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2008 8:10 PM
To: PHP. DB Mail List
Subject: [PHP-DB] Date Translation in MySQL
I'm looking for a quick and simple way to query a MySQL database by date, or
more specifically, by day of the week. My
I'm looking for a quick and simple way to query a MySQL database by date, or
more specifically, by day of the week. My dates are stored in the DB in
-MM-DD HH:MM:SS format. Question, is there a built-in for PHP or MySQL
that will take this column and return only Saturdays, for example, withou
latively knew to PHP, so I
appreciate help towards the right direction.
Cheers,
Ben Stones.
(PS: The PHP code is below)
$con = mysql_connect("localhost", "ben_test", "removed") or
die(mysql_error());
$db = mysql_select_db("ben_test") or die(mysql_er
Hello,
Thank you for your help previously everyone, I was able to fix that problem.
The thing now, is that I want to add smileys to the messages; i.e. :) would
equal to a smiley image when posting a message.
$con = mysql_connect("localhost","removed","removed") or die("con");
$db = mysql_select_d
tputted "insert" so it has to be something to do with
the insert sql syntax I have added. Not sure if its over-riding the same
content added as before or something.
Any help once again is appreciated.
Thank you,
Ben Stones.
On Jan 3, 2008 3:16 AM, Benjamin Darwin <[EMAIL PROTECTED]>
Hello, my name is Ben Stones. I am quite a beginner to PHP, and as a new
years resolution I am going to learn PHP (finally!)
Cut to the chase I have created a basic looping script that would display
anything submitted in a form, on seperate lines; here is the PHP code:
$con = mysql_connect
I believe this does exactly what you want.
http://us3.php.net/extract
Ben Hatfield
Programmer
[EMAIL PROTECTED]
Soapbox Studio, Inc.
469 N. Lake Street
Mundelein, IL 60060
P: +1.847.566.0666 x6#
www.soapboxstudio.com
On Jul 26, 2006, at 12:14 pm, z wrote:
Hi,
I have a table with about 50
?
Ofcourse if im wrong I would like to know the reason also :)
Thanks in advance,
Ben-Nes Yonatan
Louie,
Try reading through this guide on Unicode. Its going to take a lot more
than what your doing to get it to work correctly.
http://www.phpwact.org/php/i18n/charsets?s=utf8
-Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, or require(),
functions, or another file access function, and have spaces or empty
lines that are output before header() is called. The same problem
exists when using a single PHP/HTML file."
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello all,
As a beginner I have been trying to send two attachments from my HTML form.
Below is the code I have been using. The problem is, I seem to only be able
to send one or the other, when I send both, although they go through, the
text I want displayed tags 6110 etc, is also sent as an attac
Hi all,
When I submit my forms, if any textfield contains a ' the result comes back
with /'
Is there anyway of stopping this?
Thanks
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
All,
I am needing to send two attachments from my form. Both fields are called
'fileatt' and 'fileatt1'. Below is the script i wrote to attach 'fileatt'
but i am unsure on how to attach 'fileatt1'. Can I just add fileatt1 or do I
need to rethink how I do it?
Many thanks
// Obtain file upload
//"Content-Disposition: attachment;\n" .
//" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n" .
"--{$mime_boundary}--\n";
Many thanks
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
:04
To: [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] New to the Mailing List
Try using the if statement.
Ben wrote:
>Morning all.
>
>I attach a document, which is used to send an email with attachments.
>What I need to do though, is if a form field is left blan
would reject and email that has tags eg '1010: '
Many thanks in advance
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 04 October 2004 15:48
To: Ben Gill
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PHP Oracle Authentication using UNIX user account
A couple notes / assumptions ..
(1) The web server is on a different machine then database
(2) The DB is not allowing remote
Hi,
My DBA's preferred authentication method is to set up a UNIX user
account (i.e. userA) and let them login without using plaintext password
authentication, ie. The user has to be logged in, they can then run (for
example) sqlplus / and that will log them into the correct database.
This
referring to the additional time it would take
the script to run or to a security issue or something else?
Thanks, Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
he other error you have, and I don't know how you think this code
runs, are the dollar signs before mysql_connect(), mysql_select_db()
and mysql_query() are not needed.
You're right. It doesn't run. I retyped instead of copy-and-paste'd;
that's a typo.
Cheers,
Be
7;','$name')");
[/PHP code]
Changing the query line to
$mysql_query("INSERT INTO `TABLE` (`id`,`name`) VALUES ('','$name')");
or
$mysql_query("INSERT INTO 'TABLE' (`id`,`name`) VALUES ('','$name')");
has no effect.
I also tried to
define("TABLE", "`mytable`");
which, too, didn't work.
Would appreciate any advice,
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
My last email shows on the archive but it also bounced back to me so I
am reposting it. Sorry of this is a double-post.
Also, I am adding this time the source code down below which I should
have probably done last time around.
Any help is much appreciated, Ben.
Hello guys,
I have an HTML
NSERT privileges.
3 - Am I putting anything (db, server) in a danger with this script?
Cheers,
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
heck of the domain - http://www.tgpwizards.com - leads me to
believe something else is happening that ain't so legit.
This should be forwarded to the list admin...
-Ben
At 02:39 PM 8/5/2004, Ben Riddell wrote:
Spamcease is whitelist software for controlling Spam. It maintains a list
of peop
ople whose email gets through.
They are a pain in the tuchus for listservs and the like, unless the person
running the program sets the parameters correctly to allow email addressed
to the list to get through, otherwise, each person on the list has to go
through the challenge and response proc
he form, but changes the action of the form to the
form itself and then adds a new dropdown for state/country/province (and
preserves anything entered in the other form field elements).
Let me know if you think you need the second option or more Javascript
details for the first option.
HTH,
-Be
On Thu, 2003-10-09 at 17:35, pete M wrote:
> http://www.php.net/manual/en/function.mysql-error.php
>
> Ben Edwards wrote:
>
> > On Thu, 2003-10-09 at 16:33, pete M wrote:
> >
> >>$new_id = mysql_query('select last_insert_id()');
> >>
> &g
so a similar way of getting the last error message, i.e.
$new_id = mysql_query('select error()');
I currently am trying to solve the problem or mysql_error() returning
nothing after an error. It may be something to do with globa
Don't think globals are off on our server, not having to use $_GET etc.
If they were turned of how would I access the MySQL error message?
Ben
On Wed, 2003-10-08 at 15:59, mike karthauser wrote:
> on 8/10/03 3:04 pm, Ben Edwards at [EMAIL PROTECTED] wrote:
>
> > Any help
problems.
Are they any other ways of getting the error?
Ben
function query_db( $sql, $db ) {
$result = mysql_query( $sql, $db ) or
error_db( $sql, $db );
return $result;
}
function error_db( $sql, $db ) {
global $SERVER_NAME, $SCRIPT_NAME;
table_top( "Database
Hehe, ok, that was bad there for a second :)
Ben
-Original Message-
From: Brian Dailey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 3:24 PM
To: Ben Lake; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SELECT FROM 2 or more tables
No, he meant rarely want to join entire tables
Rarely want to do joins? That's a new one.
Ben
-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 3:04 PM
To: John Ryan
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SELECT FROM 2 or more tables
A join merges every record in one table
e has
become such a "find anything, or at least something" search engine. Is
anyone looking for the answer before asking the masses!
The open source community has come a long way in documentation. USE IT!
Ben Lake
-Original Message-
From: Aleks @ USA.net [mailto:[EMAIL PROTECTED]
PHP 5.0 doesn't come with mysql support... You have to get the libraries
yourself... I think u can get them from mysql.com
Might have to pay? I haven't totally figure out the implications of the
no mysql in PHP 5.0 yet, but I know its not there.
Ben
-Original Message-
From: K
ing. According to what your saying the page should not even start
rendering if the mysql_* calls are truly locking, unless your using
buffering and flush(). Worst case if the functions were locking, you
would see a PHP script execution timeout error, if they are being
displayed.
Ben Lake
-Ori
You cannot write anything out before the session_start() call.
The error tells you that you have written something at:
output started at c:\inetpub\wwwroot\ads4u\data_valid_fns.php:25
Check for any echo, print or html output before session_start()
Hope that helps,
Ben
"Ahmed Abdel
http://www.mysql.com/doc/en/mysqldump.html
www.mysql.com -> Documentation -> search = answers
Ben
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, July 04, 2003 4:02 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Backing up entire database...
I
WTF does "To unsubscribe, visit: http://www.php.net/unsub.php"; at the
bottom of every e-mail mean to you idgit?
Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 4:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] hmmm
Y
al license to be used that is
causing all of the fuss?
Correct me if I'm wrong, just trying to figure out what's going to
happen to some legacy stuff when 5 hits the fan!
Thanks,
Ben Lake
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am using the below function (error_db) witch is called thus:-
function query_db( $sql, $db ) {
$result = mysql_query( $sql, $db ) or
error_db( $sql, $db );
return $result;
}
But $sqlerr is always blank (it is set with '$sqlerr = mysql_error( $db
);'). Any idea
riginal Message-
From: Ben Edwards [mailto:[EMAIL PROTECTED]
Sent: maandag 24 maart 2003 12:03
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL or Postgres
Could someone please point me in the correct direction for a decent
comparison of the two in respect of:-
Reliability
Scalability
Speed
from MySQL to
Postgress.
Proples general experiences/comments also welcome.
Beb
* Ben Edwards +44 (0)117 968 2602 *
* Critical Site Builderhttp://www.criticaldistribution.com *
* online collaborative
BCSI) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 2:43 PM
To: Ben Walling; '[EMAIL PROTECTED]'
Subject: RE: Stumped again...
I don't really understand this suggestion. Could someone possibly
expound on this further? Maybe an example? Thanks.
-Original Mes
Couldn't you use the 'for each' method on $_POST instead?
.b
> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Sent: 15 January 2003 16:44
> To: 'Fred Wright'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Re: Undefined index and variables
>
>
> Fred,
>
> I don'
Check the PHP-DB archives ;-)
http://news.php.net/article.php?group=php.db&article=22433
Hatem
- Original Message -
From: "Rich Hutchins" <[EMAIL PROTECTED]>
To: "Seabird" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 12:24 AM
Subject: RE: [PHP-DB] small data
h() {
document.write('get flash');
}
// Done -->
html_snip;
return $output;
}
now when i do this i c instead of the flash a white square with the right measures.
if i just call show_swf.swf?filename=filename from the address row at the browser i
can c the flash being displayed but its huge (all over the screen).
does anyone have any idea or can just give me a link to related info?
With Thanks in Advance!
Yonatan Ben-Nes
Hi all!
Does anyone know where can i find some information about displaying flash from a db?
I'm breaking my head over it, searching at newsgroups, searching at the net,
addressing newsgroups but still nothing!
Help b4 im cutting my hands off!!!
With hopes to be saved :P
Yonatan Ben-Nes
isplay the clip itself!
can anyone help me with this or just give me a link to related info?
Thanks in advance,
Ben-Nes Yonatan
p.s
first time that i use newsgroups for such things... so.. if i did something wrong just
notify me :P
Oops sorry for never testing before sending :P the script works fine
but there is a little change, there is a hiddent should be changed to hidden
in the form ;)
that's all,
enjoy
- Original Message -
From: "Hatem Ben" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
hello,
you can do it this way (using mysql):
Specify a name for your image :
Select your image file :
";
echo $form;
} else {
// You have an image that you can insert it in database
/* Connecting, selecting database */
$link = @mysql_connect("mysql_host", "mysql_user", "mysql_password")
or
i was trying to do it with preg_replace, but this is much better
thanks a lot,
Hatem
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Hatem Ben" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, October 06, 2002 3
$_REQUEST is an associative array consisting of the contents of $_GET,
$_POST, $_COOKIE, and $_FILES
http://www.php.net/manual/en/reserved.variables.php
- Original Message -
From: "Shoulder to Shoulder Farm" <[EMAIL PROTECTED]>
To: "PHP Database List" <[EMAIL PROTECTED]>
Sent: Sunday, O
hey all
i have a database of arrays like this :
Array
(
[0] => 2-
[1] => 8b2
[2] => 8#c3
[3] => 8b2
[4] => 8#f2
[5] => 4a2
[6] => 8a1
[7] => 8a2
[8] => 4a2
[9] => 4a2
[10] => 4a2
)
i just need to change in every string the last value when it is eq
Just remove and create ure database without \p\g , it will be faster ;-)
Hatem
- Original Message -
From: "Russell Griechen" <[EMAIL PROTECTED]>
To: "Php-Db" <[EMAIL PROTECTED]>
Sent: Wednesday, October 02, 2002 1:50 AM
Subject: [PHP-DB] PhpHoo_create database phpHoo\p\g
> I was lookin
a php/mysql already exist : http://www.bigprof.com/appgini/
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'johnny1b1g'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, September 29, 2002 4:19 PM
Subject: RE: [PHP-DB] Very cool -= Code Generator =- !!!
> >
i've check it, and also try it, code generated for a sample database won't
run okay, most pages return errors !
if it will support others database, it will be a great tool
Best regards,
Hatem
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'johnny1b1g'" <[EMAIL PR
both tools don't work okay for me, i'm just using the export tool in
MsAccess then convert database to xml, and thanks to PHP, i convert that to
mysql queries.
Just one problem when i want to convert binary data (pict or others), still
haven't find a suitable solution for that.
Best regards,
Hat
e? Or am I completely wrong about that? All suggestions and help
appreciated.
Thanks, Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How do you get the date that is 14 days from today's date?
I can get that date with mysql monitor but PHP. I am using PHP4 and MySQL. I
have tried many things but nothing works.
Does anyone give me a help?
Thank you.
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscri
How do you get the date that is 14 days from today's date.
I am using PHP4 and MySQL. I can get that date with MySQL monitor but php. I
have tried many things but nothing works.
Does anyone give me a help?
Thank you.
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscri
you should look things up in the manual, there is a
PDF and web searchable version for both MySQL and PHP. Search for
AUTO_INCREMENT.
Although I am impressed you are using db list not general one ;)
Ben
At 07:15 P 21/10/01, Brett Conrad wrote:
>Hi.
>
>I'm creating a class
ed to
find a alternative fullsearch method.
Ben
******
* Ben Edwards+352 091 429995 *
* Homepagehttp://www.gifford.co.uk/~bedwards *
* i-Contact Progressive Videohttp://www.videonetwork.org
on
hardcore commercial users who can't afford our own box.
The latest documentation categorically states there is no other way of
changing this.
******
* Ben Edwards+352 091 429995 *
* Homepage
I am looking for an alternative which can be implemented
on php4. Has anyone any suggestions?
Ben
3.23.41-log
Also in the manual it mentions freetext search
**
* Ben Edwards+352 091 429995 *
* Hom
=oldid;
So, that was brief and messy... but I think it will work. I'm hesitant to
try it, because I can't create a new database, and I don't want to try it
on live data.
So, can anyone see a problem with this, aside from the old "why do you
want to do that?" crap?
Thanks,
;t be that difficult... but would probably slow the
application down... I fear that, because of the relationships I have, if
I ever decide to compact the database later, it will be an extremely
trying task.
Thanks,
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-ma
That should do it =>
Good luck!
Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf
Of system
Sent: Friday, July 13, 2001 8:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Date Format
Friends,
I have a design, up and running scripts connected to My
You could split the string on the slashes with explode('/',$string) and
then manipulate the array elements you get back.
Good luck,
Ben
-Original Message-
From: Dennis Kaandorp [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 9:21 AM
To: [EMAIL PROTECTED]
Subjec
Check out http://www.phpbuilder.com/columns/florian19991014.php3. It
deals with MySQL, but the concepts should be the same... it sounds like
there are some steps about handling the binary data in a binary-safe
fashion that are getting left out.
Good luck,
Ben
-Original Message-
From: a
new windows, so they could
just close the window and it will be okay... but that's not a very good
solution either, is it =>
Good luck,
Ben
-Original Message-
From: Keith Spiller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 6:43 AM
To: Php-db
Subject: [PHP-DB] Warning:
It works for me... except that you need a semi-colon after 'return
$returned_string' and it sticks the word OR at the end of the whole
string, which you may not want.
Does that help, or did I miss the point?
Ben
-Original Message-
From: Brad Lipovsky [mailto:[EMAIL PROTECT
Guess I'm just a big dumbass then, aren't I =P
Oops.
I suppose that would cause it to fail then, wouldn't it?
=> Ben
-Original Message-
From: Matthew Loff [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 5:10 PM
To: 'Ben Bleything'; 'Mark Gordo
Sure he is. Right here:
$queryResult = mysql_query($sql);
what exact error is occurring?
-Original Message-
From: Matthew Loff [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 5:00 PM
To: 'Mark Gordon'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Dynamic SQL + result resource error
The value of a CHECKED Checkbox is 'CHECKED'
So, you would do:
hth
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com
"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK..
the
numbers at the end of the statement. But I cant see what...
Pls help.
Thanks in advance.
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com
"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WOR
know, what files
go where etc...
Thanks.
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com
"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK.."
--
PHP Database Mailing List (htt
more info)...
You might try some other types if you desperately need to put the whole
file in the database (longtext ?). The result will be the same though, you
will be able to store a bigger file, but will still have problems when it
comes to storing a huge one ;).
--
Ben
--
PHP Database
have a look at the wordwrap() functions in the PHP manual
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com
"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK.."
--
PHP Databa
Closing a MySQL connection is a good habit to get into,
However, what you describe, doesn't sound like a PHP error, it may just be one
of the many errors with msie rearing its head.
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [
tion to the sever side checking and
never required.
Here's the quickest way I know to validate an integer in php:
if (ereg("^[0-9]+$", $input))
{
// $input is a valid non-negative integer
}
or, if negative numbers are valid, use could use this one:
if (ereg("^-?[0-9]
What is the best field type to use for an Auto_Increment field?
i am using int at the moment, is there a better one?
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com
"MAKING sense o
s to mysql, hence you have to backslash them in
the php code. Try :
$query="SELECT * FROM members WHERE status = \"deceased\"";
--
Ben
History is curious stuff You'd think by now we had enough Yet the fact
remains I fear They make more of it every year.
--
PHP Database M
FROM dept WHERE shortname=\"$shortname\"";
(you need to send quotes to mysql if the type of shortname in your
database is text or the like, that's why there's the \"$var\")
--
Ben
History is curious stuff You'd think by now we had enough Yet the fact
remains
Hope this helps
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com
"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK.."
--
PHP Database Mailing List (http://www.ph
hough, definitely worth trying http://www.irt.org I would be
very supprised if there wasn't an FAQ specifically about this (its actually
very easy to do in Javascript).
Have fun,
Ben Stoneham
Technical Director - FCP Internet LTD
__
e my Password in the source right?
Does this answer your question?
As the MySQL server is on localhost, then the password never leaves the
machine, so is not travelling over the internet.
Therefore, no-one can packet grab from the machine to get the password.
-- Ben Cairns - Head Of Technical Operat
ed as variables inside a separate
script that is then called via and 'include' statement (which should then be
read-only to 'root' if memory server me right -its been a long time since I
ran PHP this way!).
Ben Stoneham
Technical Di
Say, you get the result into a variable called $foo
You could use:
floor($foo);
this would round it DOWN to a whole number:
EG
2.1 returns 2
2.9 returns 2
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http
If was to create a table in a database with 19 Fields, and define them all
as a BLOB, even though some of them may only hold a max of 10 characters.
What would be the implications of this?
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail
I have a date stored in a MySQL field in a format like this:
For example, 02/02/2001 (Today) would be stored as:
02022001
What I need to do is to format that so that it looks like:
02/02/2001
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail
100 matches
Mail list logo