Hello,
is an alternative syntax.
http://php.net/manual/en/control-structures.alternative-syntax.php
Premek.
On Wed, 10 Jul 2013 13:15:22 +0200, Jim Giner
jim.gi...@albanyhandball.com wrote:
Can someone tell me what this syntax is? I looked around but don't see
any mention of it.
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Aug 26, 2012, at 1:36 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
Well, it turns out that I'm just an idiot...
--
Thanks,
Ash
That was easy -- anyone of us could have told you that. :-)
Cheers,
tedd
PS: We all have our time in the barrel.
_
On Sat, Aug 25, 2012 at 9:56 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote:
Can you tell us what is the error shown in browser or CLI?
On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
I've just
On Sun, 2012-08-26 at 04:36 -0500, tamouse mailing lists wrote:
On Sat, Aug 25, 2012 at 9:56 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote:
Can you tell us what is the error shown in browser or CLI?
On Sun, Aug 26, 2012 at
On 26 Aug 2012, at 03:56, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
Through the browser I get:
Parse error: syntax error, unexpected $end
in /var/www/html/siteinquestion/index.php on line 356
Through the CLI I get:
PHP Parse error: syntax error, unexpected $end in index.php on
On Sun, 2012-08-26 at 11:02 +0100, Stuart Dallas wrote:
On 26 Aug 2012, at 03:56, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
Through the browser I get:
Parse error: syntax error, unexpected $end
in /var/www/html/siteinquestion/index.php on line 356
Through the CLI I get:
Maybe you have a ? inside the HTML code and your php configuration
allows short open tags? In production that setting could be disabled.
On Sun, Aug 26, 2012 at 9:20 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Sun, 2012-08-26 at 11:02 +0100, Stuart Dallas wrote:
On 26 Aug 2012, at
On Sun, 2012-08-26 at 09:21 -0300, Samuel Lopes Grigolato wrote:
Maybe you have a ? inside the HTML code and your php configuration
allows short open tags? In production that setting could be disabled.
On Sun, Aug 26, 2012 at 9:20 AM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On Sat, Aug 25, 2012 at 6:54 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
I've just inherited some (pretty awful code) that I have to make some
edits to, and came across a bit of a problem. A lot of the code breaks
in and out of PHP and into HTML code:
?php
while(condition)
{
?
On Sun, Aug 26, 2012 at 5:02 AM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On Sun, 2012-08-26 at 04:36 -0500, tamouse mailing lists wrote:
On Sat, Aug 25, 2012 at 9:56 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote:
Can
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote:
Can you tell us what is the error shown in browser or CLI?
On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
I've just inherited some (pretty awful code) that I have to make some
edits to, and came
On Sat, Aug 25, 2012 at 6:54 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
I've just inherited some (pretty awful code) that I have to make some
edits to, and came across a bit of a problem. A lot of the code breaks
in and out of PHP and into HTML code:
?php
while(condition)
{
?
Can you tell us what is the error shown in browser or CLI?
On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
I've just inherited some (pretty awful code) that I have to make some
edits to, and came across a bit of a problem. A lot of the code breaks
in and out
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote:
Can you tell us what is the error shown in browser or CLI?
On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
I've just inherited some (pretty awful code) that I have to make some
edits to, and came
Generally... Wouldn't grouping by an id (which is normally unique) have no
real benefit... Except some strange behaviour?
Just to clarify: Why aren't you sticking to the LIMIT 1?
2012/2/7 ad...@buskirkgraphics.com
I have been struggling with this issue for an hour and honestly I am not
sure
-Original Message-
From: Louis Huppenbauer [mailto:louis.huppenba...@gmail.com]
Sent: Tuesday, February 07, 2012 9:24 AM
To: ad...@buskirkgraphics.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] syntax question
Generally... Wouldn't grouping by an id (which is normally
ad...@buskirkgraphics.com hat am 7. Februar 2012 um 15:11 geschrieben:
I have been struggling with this issue for an hour and honestly I am not
sure why.
I consider myself to be pretty savvy with MySQL but I am running into an
syntax error that is just flat out eluding me.
$query =
-Original Message-
From: ma...@behnke.biz [mailto:ma...@behnke.biz]
Sent: Tuesday, February 07, 2012 10:47 AM
To: php-general@lists.php.net; ad...@buskirkgraphics.com
Subject: Re: [PHP] syntax question
ad...@buskirkgraphics.com hat am 7. Februar 2012 um 15:11 geschrieben
I don't think you're suppose to end your queries with a semicolon. Try:
$sql = SELECT * FROM photographs WHERE
photo_filename LIKE '%2%' LIMIT 0, :q;
On Mon, Dec 12, 2011 at 1:49 PM, Stephen stephe...@rogers.com wrote:
So I am getting this SQL error:
Error selecting
On Mon, Dec 12, 2011 at 4:22 PM, FeIn aci...@gmail.com wrote:
I don't think you're suppose to end your queries with a semicolon. Try:
you can end your queries with semicolon in prepared statements.
How can I see the prepared SQL statement before it is executed?
try- var_dump ($statement);
-Original Message-
From: Gates, Jeff [mailto:gat...@si.edu]
Sent: Wednesday, August 03, 2011 10:23 AM
To: php-general@lists.php.net
Subject: [PHP] Syntax Question
I, too, am a super newbie. I have a beginning knowledge of being able
to
read php and understand its syntax but I
On 8/3/11 10:41 AM, ad...@buskirkgraphics.com ad...@buskirkgraphics.com
wrote:
-Original Message-
From: Gates, Jeff [mailto:gat...@si.edu]
Sent: Wednesday, August 03, 2011 10:23 AM
To: php-general@lists.php.net
Subject: [PHP] Syntax Question
I, too, am a super newbie. I have a
As pointed out echo $insertSQl should help you locate many trivial
problems. But using PDO will avoid these kind of problems
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Switching to pdo won't necessarily remove sql errors any more than using a php
framework will remove php errors.
Thanks,
Ash
http://www.ashleysheridan.co.uk
- Reply message -
From: kranthi kranthi...@gmail.com
Date: Mon, Oct 4, 2010 09:04
Subject: [PHP] Syntax Error
To:
On Sun, Oct 3, 2010 at 12:47 PM, Gary gp...@paulgdesigns.com wrote:
I have just created a registration page using Webassist, and I am getting a
syntax error that I am not understanding. Anyone be able to point me in
the
right direction?
You have an error in your SQL syntax; check the
On Sun, 2010-10-03 at 13:14 -0400, chris h wrote:
On Sun, Oct 3, 2010 at 12:47 PM, Gary gp...@paulgdesigns.com wrote:
I have just created a registration page using Webassist, and I am getting a
syntax error that I am not understanding. Anyone be able to point me in
the
right
Dasn wrote:
I got the syntax error. Why?
Read the first paragraph on the following page.
http://us3.php.net/manual/en/language.oop5.properties.php
[quote]
... This declaration may include an initialization, but this initialization must be a constant
value--that is, it must be able to be
2010/2/11 Jim Lucas li...@cmsws.com
Dasn wrote:
I got the syntax error. Why?
only constant literal is allowed.
You can think that it is static complie but not on runtime .
Regards,
Eric,
Read the first paragraph on the following page.
From: Miller, Terion
I'm almost there with my little pagination script but now I'm hung on
the
Unexpected T_Variable error...which in the past has been a
semi-colon
missing so I'm not sure why this is throwing it...eyes please:
printf('a
Miller, Terion wrote:
I'm almost there with my little pagination script but now I'm hung on the
Unexpected T_Variable error...which in the past has been a semi-colon
missing so I'm not sure why this is throwing it...eyes please:
printf('a
Thanks Jim!! I did read the manual and don't get it, like why is printf used
and not echo...how do you decided which to use?
On 7/16/09 11:25 AM, Jim Lucas li...@cmsws.com wrote:
printf(
'a href=view.php?name=%sb%s/bbr /%sbr /br //a',
$row['name'],
$row['name'],
On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas li...@cmsws.com wrote:
Miller, Terion wrote:
I'm almost there with my little pagination script but now I'm hung on the
Unexpected T_Variable error...which in the past has been a semi-colon
missing so I'm not sure why this is throwing it...eyes
Andrew Ballard wrote:
On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas li...@cmsws.com wrote:
Miller, Terion wrote:
I'm almost there with my little pagination script but now I'm hung on the
Unexpected T_Variable error...which in the past has been a semi-colon
missing so I'm not sure why this is
Miller, Terion wrote:
Thanks Jim!! I did read the manual and don't get it, like why is printf used
and not echo...how do you decided which to use?
On 7/16/09 11:25 AM, Jim Lucas li...@cmsws.com wrote:
printf(
'a href=view.php?name=%sb%s/bbr /%sbr /br //a',
On Thu, Jul 16, 2009 at 12:43 PM, Andrew Ballardaball...@gmail.com wrote:
On Thu, Jul 16, 2009 at 12:35 PM, Jim Lucas li...@cmsws.com wrote:
Andrew Ballard wrote:
On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas li...@cmsws.com wrote:
[snip]
Also, this is the wrong way to use printf(). Please
Bastien Koert wrote:
On Thu, Jul 16, 2009 at 12:43 PM, Andrew Ballardaball...@gmail.com wrote:
On Thu, Jul 16, 2009 at 12:35 PM, Jim Lucas li...@cmsws.com wrote:
Andrew Ballard wrote:
On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas li...@cmsws.com wrote:
[snip]
Also, this is the wrong way to use
Jan G.B. wrote:
you don't need the ugly . . string . merging.
um, I guess most of my code is ugly ;)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2009/4/3 aurfal...@gmail.com:
Hi all,
For any one following this thread, here is how I worked around the
apache/php/chown limitation.
script snippet (and if any one has a more elegant style, please share as I
am an amateur script kiddie).
$path = /homes.$username;
$chowncmd =
Chris wrote:
Shawn McKenzie wrote:
Chris wrote:
Wow, it does chown and chmod as well, thats friggen cool.
chown will only work if the script is running as root which I doubt your
drupal site will be.
Or if the script is running as a user/group that has write permissions
to the dir/file
aurfal...@gmail.com wrote:
Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);
But when placed in a larger PHP script being part of the
ldap_provisioning module in Drupal, the
aurfal...@gmail.com wrote:
Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);
But when placed in a larger PHP script being part of the
ldap_provisioning module in Drupal, the Drupal
On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:
aurfal...@gmail.com wrote:
Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);
But when placed in a larger PHP
On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:
aurfal...@gmail.com wrote:
Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);
But when placed in a larger PHP script
On Thu, 2009-04-02 at 15:58 -0700, aurfal...@gmail.com wrote:
On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:
aurfal...@gmail.com wrote:
Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir
On Thu, 2009-04-02 at 15:58 -0700, aurfal...@gmail.com wrote:
On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:
aurfal...@gmail.com wrote:
Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir
Wow, it does chown and chmod as well, thats friggen cool.
chown will only work if the script is running as root which I doubt your
drupal site will be.
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Chris wrote:
Wow, it does chown and chmod as well, thats friggen cool.
chown will only work if the script is running as root which I doubt your
drupal site will be.
Or if the script is running as a user/group that has write permissions
to the dir/file that your trying to chown.
--
Shawn McKenzie wrote:
Chris wrote:
Wow, it does chown and chmod as well, thats friggen cool.
chown will only work if the script is running as root which I doubt your
drupal site will be.
Or if the script is running as a user/group that has write permissions
to the dir/file that your trying
Chris wrote:
Shawn McKenzie wrote:
Chris wrote:
Wow, it does chown and chmod as well, thats friggen cool.
chown will only work if the script is running as root which I doubt your
drupal site will be.
Or if the script is running as a user/group that has write permissions
to the dir/file
Hi all,
For any one following this thread, here is how I worked around the
apache/php/chown limitation.
script snippet (and if any one has a more elegant style, please share
as I am an amateur script kiddie).
$path = /homes.$username;
$chowncmd = /usr/bin/sudo /bin/chown ;
mkdir($path);
On Fri, Mar 6, 2009 at 2:05 PM, Terion Miller webdev.ter...@gmail.com wrote:
I have this and think maybe something is off, because if there is an amp ()
in the location then it only displays a comma , and nothing else:
if (isset($_SERVER['QUERY_STRING'])) {$Page .= ($_SERVER['QUERY_STRING']?
just clean up your code and it will work:
?php
$qString = 'http://www.google.ca/search?hl=enq=php+rocks%21%21%21meta=';
if (isset($qString))
{
$buffer = str_replace(,amp;,$qString);
}
echo $buffer.\n;
?
OUTPUT:
C:\php test.php
SELECT something FROM tbl_name
- WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) = date_col;
Taking that and changing it so it works for you would result in the
following.
$query .= WHERE DATE_SUB(CURDATE(), INTERVAL 7 DAY) = `stamp`;
Try that and let us know your results. */for the
On Wed, 2009-02-25 at 07:17 -0600, Terion Miller wrote:
SELECT something FROM tbl_name
- WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) = date_col;
Taking that and changing it so it works for you would result in the
following.
$query .= WHERE DATE_SUB(CURDATE(), INTERVAL 7 DAY) =
WHERE
date = DATE_SUB(NOW(), INTERVAL 7 DAY)
Works just fine for me.
R
On Tue, Feb 24, 2009 at 4:15 PM, Terion Miller webdev.ter...@gmail.comwrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp
On Tue, 2009-02-24 at 15:15 -0600, Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue
Terion Miller wrote:
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
Try
$query .= WHERE stamp SUBDATE(NOW(), INTERVAL -7 DAY);
instead.
Marc
--
http://bithub.net/
Synchronize and share your files over the web for free
My Twitter feed
Marc Steinert wrote:
Terion Miller wrote:
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
Try
$query .= WHERE stamp SUBDATE(NOW(), INTERVAL -7 DAY);
instead.
Marc
Damn, hit the send-button too fast. Replace -7 with 7. Sry for spamming the
list.
--
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
the lay language is
Has nothing at all to do with php.
http://dev.mysql.com/doc/refman/5.0/en/datetime.html
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Yeah guess I posted to the wrong list should of been on the php-db list
maybe
but thanks for the suggestions
Marc I'll be trying yours
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
the lay
Nobody has asked to confirm, but what format is `stamp`?
Unix Timestamp, MySQL Timestamp, MySQL Date stamp???
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Twelfth Night, Act II, Scene V
by William Shakespeare
Martin Zvarík wrote:
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no
Micah Gersten napsal(a):
Martin Zvarík wrote:
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query
Micah Gersten wrote:
Martin Zvarík wrote:
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp
Micah Gersten wrote:
$query .= WHERE stamp .(time()-7*3600*24);
Using something like that is disastrous for DST and Leap Seconds...
That's why you use UTC for servers and translate to local time when you
need to display it.
Not sure that solves the leap second issue, but it
Terion Miller wrote:
Nobody has asked to confirm, but what format is `stamp`?
Unix Timestamp, MySQL Timestamp, MySQL Date stamp???
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Twelfth Night, Act II, Scene V
by
Jim Lucas wrote:
Terion Miller wrote:
Nobody has asked to confirm, but what format is `stamp`?
Unix Timestamp, MySQL Timestamp, MySQL Date stamp???
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Twelfth Night, Act II,
On Fri, Dec 5, 2008 at 1:31 AM, ddg2sailor [EMAIL PROTECTED] wrote:
Its begining to look like this code was written for a newer sql
[snip!]
Negative. It's either a custom function or was written
incorrectly in the first place. There's never been a native PHP
function `do_mysql_query`,
On Thu, Dec 4, 2008 at 8:32 PM, ddg2sailor [EMAIL PROTECTED] wrote:
This is acctualy a very simple code... But I dont know exactly what to do
with line 18. It looks to be taking something from dox and redefining it as
RES. There is some related code but with syntax is pretty much has to be
Sorry , I did mean to mention that... But I forgot.
The original error is :
Fatal error: Call to undefined function do_mysql_query() in
C:\xampp\htdocs\getdox.php on line 18
Something to do with this // or sqlerr(); //?
Thanks
Daniel P. Brown-2 wrote:
On Thu, Dec 4, 2008 at 8:32 PM,
On Thu, Dec 4, 2008 at 6:44 PM, ddg2sailor [EMAIL PROTECTED] wrote:
Sorry , I did mean to mention that... But I forgot.
The original error is :
Fatal error: Call to undefined function do_mysql_query() in
C:\xampp\htdocs\getdox.php on line 18
likely something to do w/ do_mysql_query() not
I have been looking at this code all night and at one point I drew the same
conclusion. But I havent been able to find it Il beg the moderators
indulgence here.. But I really do need to add this code which calls the
other code as a user hits a link.
//dox.php//
?
require
ddg2sailor wrote:
I have been looking at this code all night and at one point I drew the same
conclusion. But I havent been able to find it Il beg the moderators
indulgence here.. But I really do need to add this code which calls the
other code as a user hits a link.
Find the file where
Its begining to look like this code was written for a newer sql
The sysop came up with an older php file that fixxed this issue Samples
enclosed.
//the file I been working on all days - relevant lines only
$filename = sqlesc($filename);
$res = do_mysql_query(SELECT * FROM dox WHERE
Not a syntax error. It's not successfully connecting to the database.
Check your settings.
~Ted
On 21-Jul-08, at 4:24 AM, Ronald Wiplinger wrote:
On a system with php4 and mysql 4.x I had these lines:
require(../db-config); // includes $dbhost, $buname, $dbpass
$db =
On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote:
On a system with php4 and mysql 4.x I had these lines:
require(../db-config); // includes $dbhost, $buname, $dbpass
$db = mysql_connect($dbhost, $dbuname, $dbpass);
mysql_select_db($dbname,$db);
$sql = SELECT
Eric Butera wrote:
On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote:
On a system with php4 and mysql 4.x I had these lines:
require(../db-config); // includes $dbhost, $buname, $dbpass
$db = mysql_connect($dbhost, $dbuname, $dbpass);
On Mon, Jul 21, 2008 at 7:55 AM, Aschwin Wesselius
[EMAIL PROTECTED] wrote:
Eric Butera wrote:
On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED]
wrote:
On a system with php4 and mysql 4.x I had these lines:
require(../db-config); // includes $dbhost, $buname, $dbpass
Eric Butera wrote:
On Mon, Jul 21, 2008 at 7:55 AM, Aschwin Wesselius
[EMAIL PROTECTED] wrote:
Probably the mysql extension is not found or not loaded (due to not being
compiled with the right path or the default path in PHP is not the right
one). Happened to me a couple of times.
--
On Mon, Jul 21, 2008 at 8:32 AM, Aschwin Wesselius
[EMAIL PROTECTED] wrote:
Oh my. I'm so sorry. You're absolutely right. I mixed these two. I'm a
bit side-tracked today.
Thanks for pointing that out.
--
Aschwin Wesselius
It's no problem, I got scared I was spreading propaganda!
On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote:
Try this:
$result = mysql_query($sql,$db) or die(mysql_error());
--
/Daniel P. Brown
Better prices on dedicated servers:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Dedicated
Please keep replies on list for all to benefit and be able to assist.
On Mon, Jul 21, 2008 at 5:47 PM, Ronald Wiplinger [EMAIL PROTECTED] wrote:
On Tue, Jul 22, 2008 at 1:51 AM, Daniel Brown [EMAIL PROTECTED] wrote:
Try this:
$result = mysql_query($sql,$db) or die(mysql_error());
the select query is
$selectqueryusername = sprintf(Select username from individuals where
username='%s', mysql_real_escape_string($username));
The syntax is fine.
$result = mysql_query($selectqueryusername);
if (!$result) {
echo Error! *** . mysql_error();
}
also for insert query if
Try this one
$sSQL = sprintf(SELECT username FROM individuals WHERE
username='%s', mysql_real_escape_string($username));
$query = mysql_query($sSQL);
if($query !== false)
{
// do something
}
2008/5/18 Sudhakar [EMAIL PROTECTED]:
until i started using the techniques for avoiding sql injection, i
Ross wrote:
Can I put post values directly into insert statements?
$query = INSERT INTO categories (category_name) VALUES
('$_POST['cat_name']);
Yes you can, but it is not secure to do that!
use (insecure):
$query = INSERT INTO categories (category_name) VALUES
Ross wrote:
Can I put post values directly into insert statements?
$query = INSERT INTO categories (category_name) VALUES
('$_POST['cat_name']);
Yes, although this is not recommended.
What is someone puts a single quote in there? Or some other bad
characters
otherwise... 2
At 3:59 PM +0100 3/26/07, Ross wrote:
Can I put post values directly into insert statements?
$query = INSERT INTO categories (category_name) VALUES
('$_POST['cat_name']);
Open to sql injection.
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP
On Mon, March 26, 2007 9:59 am, Ross wrote:
Can I put post values directly into insert statements?
$query = INSERT INTO categories (category_name) VALUES
('$_POST['cat_name']);
Sure!
If you want your webserver to get hacked by the Bad Guys, just go
right ahead and do that.
[that was
Escape it, use either htmlentities (with ENT_QUOTES) or addslashes.
--
itoctopus - http://www.itoctopus.com
Richard Lynch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Mon, March 26, 2007 9:59 am, Ross wrote:
Can I put post values directly into insert statements?
$query =
JD wrote:
Can someone help me figure out why I can't run this on MySQL. I get a
syntax error.
list($qh,$num) = dbQuery(SELECT password AS passwd1,
$DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 .
FROM $USER_TABLE WHERE username='$username');
$data = dbResult($qh);
You've already
bruce wrote:
chris...
sure there is.. alot of people don't subscribe to other lists. if you're one
who does, simply ignore his post.
And if the poster looked at either of the responses he received and
replied to the questions asked, then he'd get a much better response.
Older version of MySQL does not support subselects.
On Sun, August 20, 2006 5:18 am, Bigmark wrote:
Can anyone tell me why this works on my localhost but gets an error on
my
server:
?php
$sql = SELECT COUNT(*) FROM leaderboard WHERE points =( SELECT
points FROM
leaderboard WHERE
On Sun, 2006-08-20 at 18:18 +0800, Bigmark wrote:
Can anyone tell me why this works on my localhost but gets an error on my
server:
Try quote your identifiers.
SELECT COUNT(*) FROM `leaderboard` WHERE `points` =( SELECT `points`
FROM
`leaderboard` WHERE `username` = '$username' );
--Paul
On 8/20/06, Bigmark [EMAIL PROTECTED] wrote:
Can anyone tell me why this works on my localhost but gets an error on my
server:
?php
$sql = SELECT COUNT(*) FROM leaderboard WHERE points =( SELECT points FROM
leaderboard WHERE username= '$username' );
$result = mysql_query( $sql ) or die (
Check the version of MySQL, I think sub queries came in version 4.1 and you
are using that. So you probably have a version=4.1 at localhost, and 4.1
at your server.
/Peter
-Original Message-
From: Bigmark [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 20, 2006 5:19 PM
To:
Michelle Konzack wrote:
Hello,
since I include source sniplets into some of my webpages I like
this syntax highlighting for php scripts... because it make
scripts more readable.
My question is: Does such thing exist for Shell scripts and C?
pastebin.com has it and the code is GPL'ed so
Check out Geshi
http://qbnz.com/highlighter/
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 5:54 PM
To: Michelle Konzack
Cc: PHP - General
Subject: Re: [PHP] syntax highlighting for Shell scripts and C?
Michelle Konzack wrote:
Hello
1 - 100 of 226 matches
Mail list logo