Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
wrote:
Can someone tell me what this syntax is? I looked around but don't see
any mention of it.
while(condition) : (statement);
> -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
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.
>
>
>
> $qu
> -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'
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
> I have been struggling with this issue for an hour and honestly I am not
> sure why.
>
> I consider mysel
On 8/3/11 10:41 AM, "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 beginning kno
> -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
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?
> >
> >
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 to
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 Ge
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 optio
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
('{$_POST['cat_na
It's fairly simple. The code you posted could also be written:
if(strpos($a,'-')){
$a = explode('-',$a,2);
}else{
$a = array($a);
}
It's called the ternary conditional operator. Unfortunatley, it's
buried in the PHP manual.
http://us2.php.net/manual/en/language.expressions.php
Jimmy wrote:
I'
Many thanks Jason.
TR
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Anthony -
The column list is a comma seperated list, the last column cannot have a
comma after it or the SQL server will expect another column to be listed.
However in that code segment it is not trying to determine if there is
or is not a column, it is simply attempting to add the (length)
at
This is what I was getting at.
The following is correct mysql syntax in which a comma must be added after
each field - except for the last field - in this case price:
i.e.,
.
CREATE TABLE chairs(
id int(5),
item varchar(50),
desc text,
price float
);
.
Ho
At 18:06 19.02.2003, Anthony Ritter spoke out and said:
[snip]
>The question:
>
>Is the reasoning that a comma *must* be added since this is _within_ a loop?
>
>As in:
>CREATE TABLE chairs (
>id INT(5),
>item VARCHAR(50),
>desc TEXT ,
>price FLOAT , // commo
Hello
"Kelly Meeks" <[EMAIL PROTECTED]> wrote:
> I saw this used in a script, but after a couple of searches didn't come up
with anything on php.net.
I think you're looking for this:
http://www.php.net/manual/en/language.types.string.php#language.types.string
.syntax.heredoc
- E
...[snip]...
There are typically called a 'heredoc' or 'here document'. basically it
changes the double quotation mark(") to
'content' (in this case). To start, do this <<
and to end it just type content;
on a line by itself.
The example you showed does echo the stuff out. It sets all the internal
html to $
let me be more specific...
if a field value is null how do I test for it in the result set, or the
array?
here's a real live example... I'm working with prepaid phone cards, and if
a card has not expired yet then the field zombie_date will be null.
so - when I do the mysql_fetch_assoc ($sql) w
> mysql_field_name() might help... but generally I know what fields I want
to
> grab, so I don't need this... I found this answer on
http://php.net/mysql.
> just as you could :)
I've been coding in other languages for about 6 years now, and I have looked
through a lot of the mysql stuff, and the
EMAIL PROTECTED]
Subject: Re: [PHP] syntax question
Justin French wrote:
>on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote:
>
>
>>how to I test for a null value?
>>
>>
>empty()? isset()? if($var == "")? if($var == "NULL")?? h
Justin French wrote:
>on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote:
>
>
>>how to I test for a null value?
>>
>>
>empty()? isset()? if($var == "")? if($var == "NULL")?? have a look in
>the php manual for string functions, and comparison operators
>
I think he maybe meant
on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote:
>if there a command that will give me the name of the fields
> in the result set?
mysql_field_name() might help... but generally I know what fields I want to
grab, so I don't need this... I found this answer on http://php.net/mysql.
j
25 matches
Mail list logo