Dear my friends
What is the substitute of mysql_error() ?
This line of my code does not work anymore:
$hslgbr=mysql_query($sqlgbr,$konek) or die ( mysql_error()
);
Thank you very much in advance.
--
Patrik Hasibuan [EMAIL PROTECTED]
Junior Programmer
--
PHP General
Dear my friends...
This sql string produces proper output in my MySQL-Query:
select image_src from products where product_id='10';
the output is:
gambarproduk/0/10/1.jpg
But my php code does not produce anything.
Please tell me what is my mistake.
===
?php
if (isset($pid)){
On 7/31/07, Crash Dummy [EMAIL PROTECTED] wrote:
Hope this isn't overkill but it is a module (read COM, or VBA
module)
to manipulate the registry:
Overkill is a massive understatement. :-)
No doubt.
To answer everyone's curiosity as to why I want to access the registry, I am
working
OK, Thanks Richards.
===
On Wed, 25 Jul 2007 23:54:37 +0100
Richard Davey [EMAIL PROTECTED] wrote:
Hi Patrik,
Wednesday, July 25, 2007, 11:30:56 PM, you wrote:
Dear my friends...
I create a very simple script in html and php as a first step. I use suse,
apache2, mysql and php.
On 7/31/07, Ken Tozier [EMAIL PROTECTED] wrote:
...
// set fetch prefs
$this-db-setAttribute(PDO:: FETCH_ASSOC,
true); // also tried 1
...
Is that the way to do it?
Hmm.. Maybe I sent you in the wrong direction - I can't find any docs on
using
Thank you very much.
===
On Fri, 27 Jul 2007 00:26:24 -0500 (CDT)
Richard Lynch [EMAIL PROTECTED] wrote:
It's register_globals, and you should fix this ancient script to not
rely on register_globals being on
On Wed, July 25, 2007 5:30 pm, Patrik Hasibuan wrote:
Dear my friends...
I
Hi Sichta,
That's what I am confused. Quoted or no Quote makes no effect. mysql_query does
not work.
I tried to debug with ..or die (mysql_error()); but it seems mysql_error()
does not exist anymore.
Please keep telling me. I've wasted to much time today hanging around with this
weird
Hey List,
In my application, I am loading html content into a DOMDocument using
loadHTML(). The DOMDocument is validated, then the element with a
certain ID tag is extracted and loaded into a node in the main
DOMDocument, which is then presented as html with saveHTML().
This works fine and
Sorry, for my recklessness
I missed, $bdku=mysql_select_db(guru,$konek);
Es ist peinlich It's embarassing.
But thanks for your help.
=
On Wed, 1 Aug 2007 15:15:43 +0700
Patrik Hasibuan [EMAIL PROTECTED] wrote:
Hi Sichta,
That's what I am confused. Quoted or no Quote makes
I'm not sure if my previous mail got through. If that is the case, I
apologize.
Hey List,
In my application, I am loading html content into a DOMDocument using
loadHTML(). The DOMDocument is validated, then the element with a
certain ID tag is extracted and loaded into a node in the main
Hi guys,
this might be a noob- question, but I simply do not care anymore. After a
few hours of fiddling with this @/**%$ (screaming AAa), I would
like to ask you.
So what I have is this: I have a search engine for a car market, which has
about 30 $_POST- vars. Now when the user
Hey Chris,
1) Use sessions (read up on it if you don't know it; in short:
session_start() at the very beginning of your script creates a $_SESSION
array that is persistent through subsequent page calls)
2) Submit the form to the search page and preprocess it by putting the
post vars into the
Christian Hänsel wrote:
Hi guys,
this might be a noob- question, but I simply do not care anymore. After
a few hours of fiddling with this @/**%$ (screaming AAa), I
would like to ask you.
So what I have is this: I have a search engine for a car market, which
has about 30 $_POST-
Some light humour:
http://www.unm.edu/~humanism/socvsjes.htm
Cheers,
Rob.
Hey,
I usually find your humour postings pretty funny but
didnt find that in the least bit funny... :(
Cheers!
R
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is
this might be a noob- question, but I simply do not care anymore. After
a few hours of fiddling with this @/**%$ (screaming AAa), I
would like to ask you.
So what I have is this: I have a search engine for a car market, which
has about 30 $_POST- vars. Now when the user clicks on a
Hallo!
class A {
...
}
class B extends A {
...
$name = get_parent_class($this); // would be A
...
}
This is *not* what I want!
class B {
...
$name = get_parent_class2($this); // should give A
...
}
class A {
...
$b = new B();
...
}
This *is* what I want!
How can i
Hi All :)
I have a php script that I am attempting to run from the CLI to
connect to a MySQL database and update a field. but when I run it
with this command: php cronjob.php it prints out the script on screen
but doesn't process it...
Running: php-rphpinfo(); prints out the standard
I would start with suppling the entire path of for php in the cron. The
path in the cron environment may be vastly different then the path in
your shell environment...
so: /path/to/php file.php
See how that works for you, of course I am assuming it runs fine from
your command line...
-B
-Original Message-
From: Ralph Kutschera [mailto:[EMAIL PROTECTED]
Sent: 01 August 2007 13:19
To: php-general@lists.php.net
Subject: [PHP] Parent Object
Hallo!
class A {
...
}
class B extends A {
...
$name = get_parent_class($this); // would be A
...
}
This is
I have had success in running CLI php pages from a bat file fired via a
scheduled task. Since the output can be limited I would suggest adding some
logging functionality to the page to trap errors and write them to a file that
you can use to analyze any issues.
bastien To:
On 8/1/07, Jason Pruim [EMAIL PROTECTED] wrote:
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/
documents/tests/ticklers japruim$
This is only from the commandline... running the script straight in a
browser
@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());
..
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/
documents/tests/ticklers japruim$
MySQL is running right? (I
Patrik Hasibuan wrote:
Dear my friends
What is the substitute of mysql_error() ?
This line of my code does not work anymore:
$hslgbr=mysql_query($sqlgbr,$konek) or die ( mysql_error()
);
Thank you very much in advance.
In what way does it not work anymore?
The code
On Wed, 1 Aug 2007 08:49:34 -0400, Jason Pruim [EMAIL PROTECTED] wrote:
Hi All :)
I have a php script that I am attempting to run from the CLI to
connect to a MySQL database and update a field. but when I run it
with this command: php cronjob.php it prints out the script on screen
but
Is there a quote in the data?
That is the usual culprit in my situations like that...
bastien
Date: Wed, 1 Aug 2007 10:54:59 +0200 From: [EMAIL PROTECTED] To:
php-general@lists.php.net Subject: [PHP] DOMDocument - loadHTML() cuts off
html input Hey List, In my application, I am loading
On Aug 1, 2007, at 8:55 AM, Brad Bonkoski wrote:
I would start with suppling the entire path of for php in the
cron. The path in the cron environment may be vastly different
then the path in your shell environment...
so: /path/to/php file.php
See how that works for you, of course I am
Hey,
Thanks for your reply.
Yes there are quotes and 'special characters' in the list:
...
option value=181Acodev/option
option value=85Africa Co-operative Action Trust/option
option value=251Agence europeacute;enne pour le
Deacute;veloppement et la Santeacute;/option
option
On Aug 1, 2007, at 9:37 AM, Thijs Lensselink wrote:
On Wed, 1 Aug 2007 08:49:34 -0400, Jason Pruim [EMAIL PROTECTED]
wrote:
Hi All :)
I have a php script that I am attempting to run from the CLI to
connect to a MySQL database and update a field. but when I run it
with this command: php
On 8/1/07, Thijs Lensselink [EMAIL PROTECTED] wrote:
On Wed, 1 Aug 2007 08:49:34 -0400, Jason Pruim [EMAIL PROTECTED] wrote:
Hi All :)
I have a php script that I am attempting to run from the CLI to
connect to a MySQL database and update a field. but when I run it
with this command: php
Some light humour:
http://www.unm.edu/~humanism/socvsjes.htm
I usually find your humour postings pretty funny but didnt find that
in the least bit funny... :(
Can't please everyone all of the time. Maybe you didn't get the joke
:B
Certainly it had be ROFLMFAO.
Holy crap, that
Jason Pruim wrote:
I have a php script that I am attempting to run from the CLI to connect
to a MySQL database and update a field. but when I run it with this
command: php cronjob.php it prints out the script on screen but doesn't
process it...
Running: php-rphpinfo(); prints out the
On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:
@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());
..
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/
On Aug 1, 2007, at 9:53 AM, Daniel Brown wrote:
On 8/1/07, Jason Pruim [EMAIL PROTECTED] wrote:
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/
documents/tests/ticklers japruim$
This is only from the
On Aug 1, 2007, at 9:55 AM, Stut wrote:
Jason Pruim wrote:
I have a php script that I am attempting to run from the CLI to
connect to a MySQL database and update a field. but when I run it
with this command: php cronjob.php it prints out the script on
screen but doesn't process it...
On Wed, 2007-08-01 at 04:29 -0700, Ryan A wrote:
Some light humour:
http://www.unm.edu/~humanism/socvsjes.htm
Cheers,
Rob.
Hey,
I usually find your humour postings pretty funny but
didnt find that in the least bit funny... :(
Can't please everyone all of the time.
Brad Bonkoski wrote:
Jason Pruim wrote:
On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:
@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());
..
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock'
Jason Pruim wrote:
On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:
@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());
..
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock'
On 8/1/07, Jason Pruim [EMAIL PROTECTED] wrote:
On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:
@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());
..
cannot connect to DB!Can't connect to local MySQL server through
socket
Okay, Now I got it figured out, it was a problem with php cli not
being able to find the mysql.sock file. I didn't realize that there
are 2 php.ini files, one for the web and the other for the CLI...
I'll look into what needs to be changed in the php.ini file... For
right now I took Dan's
On Wednesday 01 August 2007 17:46:44 Brad Bonkoski wrote:
Hi,
Please Check php.ini of cli. They are different. Maybe there where problem in
php.ini
Regards
Sancar
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can't please everyone all of the time. Maybe you
didn't get the joke :B
Certainly it had be ROFLMFAO.
Well..., to each his own :)
Have a nice day!
R
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone
Ave,
Trying to configure, build compile PHP 5.2.3 on a Mac OS X 10.3.9 from
scratch (Since there is no installer available for Panther). Installed all
dependencies. Latest mySQL 5 client/server is installed (Using the mySQL
Installer available at the mySQL website). I did not build compile
This sort of thing really isn't helpful...
?php
$a = 75.82 * 100;
echo intval($a);
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 8/1/07, Mark Summers [EMAIL PROTECTED] wrote:
This sort of thing really isn't helpful...
?php
$a = 75.82 * 100;
echo intval($a);
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What exactly were you expecting it to do? :)
Very weird and counter intuitive. Looking at the php manual, I see this:
Converting to integer from floating point:
When converting from float to integer, the number will be rounded towards
zero.
But you'd think the multiplication would happen before the rounding.
if you do:
$a = ceil(75.82
Probably return 7582 instead of 7581.
= = = Original message = = =
On 8/1/07, Mark Summers [EMAIL PROTECTED] wrote:
This sort of thing really isn't helpful...
?php
$a = 75.82 * 100;
echo intval($a);
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
It is most definitely not if what you want is the square root, or the
hyperbolic cosine or any other of a zillion things.
- Original Message -
From: Mark Summers [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, August 01, 2007 6:52 PM
Subject: [PHP] Loss of precision
You might use http://www.php.net/reserved.variables SERVER_ADDR
to get the address of the host you are running under if you wanted
to
access it from PHP only.
Ah, but there is a catch. If you looked at my snapshot, you saw that
there are two addresses, and the server address will not
Internally, 75.82 can't be stored exactly, so 75.82 * 100 is probably
7581.92 rather than the expected integer value of 7582. So intval is
behaving properly. Sounds like you want intval(round($a));
[EMAIL PROTECTED] wrote:
Very weird and counter intuitive. Looking at the php manual, I see
On 8/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Probably return 7582 instead of 7581.
= = = Original message = = =
On 8/1/07, Mark Summers [EMAIL PROTECTED] wrote:
This sort of thing really isn't helpful...
?php
$a = 75.82 * 100;
echo intval($a);
?
--
PHP General
Hi,
My script is working, but valid returns true even if the user is
bogus. What needs changing so both conditions have to match, the
following attempt returned unexpected logical
if (getmxrr($domaintld,$mxrecords)) if(fsockopen($domaintld,25,
$errno,$errstr,30)) {
$valid
Hi,
Engaged in cleanup project, attempting to understand the
uncommented decisions of predecessors. Inserting the following
contact form values into a DB:
$first = '.addslashes($_POST['firstname']).';
$last = '.addslashes($_POST['lastname']).';
$email =
[snip]
$first = '.addslashes($_POST['firstname']).';
$last = '.addslashes($_POST['lastname']).';
$email = '.addslashes($_POST['email']).';
$address = '.addslashes($_POST['address']).';
$city = '.addslashes($_POST['city']).';
$state = '.addslashes($_POST['state']).';
CK wrote:
Hi,
My script is working, but valid returns true even if the user is
bogus. What needs changing so both conditions have to match, the
following attempt returned unexpected logical
if (getmxrr($domaintld,$mxrecords))
if(fsockopen($domaintld,25,$errno,$errstr,30)) {
CK wrote:
Hi,
Engaged in cleanup project, attempting to understand the uncommented
decisions of predecessors. Inserting the following contact form values
into a DB:
$first = '.addslashes($_POST['firstname']).';
$last = '.addslashes($_POST['lastname']).';
$email =
CK wrote:
Hi,
My script is working, but valid returns true even if the user is bogus.
What needs changing so both conditions have to match, the following
attempt returned unexpected logical
if (getmxrr($domaintld,$mxrecords))
if(fsockopen($domaintld,25,$errno,$errstr,30)) {
On Wed, 2007-08-01 at 13:20 -0700, CK wrote:
Hi,
Engaged in cleanup project, attempting to understand the
uncommented decisions of predecessors. Inserting the following
contact form values into a DB:
$first = '.addslashes($_POST['firstname']).';
$last =
Roberto Mansfield wrote:
Internally, 75.82 can't be stored exactly, so 75.82 * 100 is probably
7581.92 rather than the expected integer value of 7582. So intval is
behaving properly. Sounds like you want intval(round($a));
[EMAIL PROTECTED] wrote:
Very weird and counter intuitive.
Hi,
Being thrust into cleaning after another has me timid. Could some
kind soul look over the following solution for form validation and DB
query? Any suggestions on security and streamlining is humbly requested.
CK
?php
$firstname =$_POST['firstname'];
$lastname =
Guys,
Got a quick question. I got a sql statement works when I pass it from
the cli. but if I try in php I get nothing.
This is the statement.
Select ip, date, time, CONCAT(city, ', ',country) as location from ips
where country !=' ' and date='`date +%Y%m%d`' order by country asc;
I know
Payne wrote:
Guys,
Got a quick question. I got a sql statement works when I pass it from
the cli. but if I try in php I get nothing.
This is the statement.
Select ip, date, time, CONCAT(city, ', ',country) as location from ips
where country !=' ' and date='`date +%Y%m%d`' order by country
I know it has to do with date='`date +%Y%m%d`', because if I remove it
works.
Are you trying to use perl's back tic operator in php here?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Michael Preslar wrote:
I know it has to do with date='`date +%Y%m%d`', because if I remove it
works.
Are you trying to use perl's back tic operator in php here?
PHP also supports the that.
However, I think the OP's problem is that it's inside other quotes and
is therefore not being
On 01/08/07, CK [EMAIL PROTECTED] wrote:
Hi,
My script is working,
[...]
$regexp = ^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]
+)*(\.[a-z]{2,4})$;
If your script is using that regular expression to validate email addresses
then your script is most definitely not working.
I like to think that I'm reasonably aware of the limitations of floating
point (famous last words).
To my mind, the ridiculousness (probably not a word) of the example is
highlighted by the fact that 75.81 and 75.83 work perfectly.
Roberto Mansfield wrote:
Internally, 75.82 can't be stored
Your best bet is to use flash. Flash has the ability to access user's
microphones built in. And since flash is cross platform it works on
everything. Also it's pretty simple to do.
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary479.html
Em Quarta 01 Agosto 2007 19:56, Robin Vickery escreveu:
On 01/08/07, CK [EMAIL PROTECTED] wrote:
Hi,
My script is working,
[...]
$regexp = ^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]
+)*(\.[a-z]{2,4})$;
If your script is using that regular expression to validate
From: Richard Lynch [EMAIL PROTECTED]
Your dev box should only match in software versions (okay, and any
really funky specialized hardware like a hardware random number
generator MAYBE).
Regarding duplicating the box versus software:
I'm working on a C++ project on a Mac Pro and a MacBook Pro.
I'm trying to pull all the components out of strings structured like:
word followed by any number of ( dot word or square bracketed string )
This is an example: foo.bar[ab.cd].baz
From the above example, I want: array('foo', 'bar', 'ab.cd', 'baz');
A regular expression to match these strings,
I've installed IIS (Internet information services on my windows XP machine.
I've also installed php 5.0 from www.php.net. I'm trying to use the mail()
function in a simple php script which uses a html form. However, i'm not able
to send the mail using the mail($to, $subject, $message,
70 matches
Mail list logo