I'm submitting form data which is a mixture of checkboxes and text inputs, some
of which are integers and a couple text based. I am retrieving the data as
follows:
$var = (int)!empty($_POST['var']); for checkboxes,
$var = (int)$_POST['var']; for integers and
$var = mysql_real_escape_string($_P
If anyone has any ideas for a tutorial, create a list. Others can add to
it. Then those interested in creating tutorials can select the idea(s) from
the list they are most familiar with. How does that sound?
- Original Message -
From: "Gunawan Wibisono"
To:
Sent: Friday, March
Well if it could be subtitled in any way, that would solve the problem, and
again I say IF.
Richard.
- Original Message -
From: "David McGlone"
To:
Sent: Thursday, March 18, 2010 12:07 PM
Subject: Re: [PHP-DB] Online PHP-Mysql Meeting
I think we should either consider audio or vid
Due to time zone differences, people in various zones (countries/continents)
can only avail of a live event within a certain time period.
A recorded presentation can be viewed by anyone anytime anywhere. No time
zone constraints.
Obviously, whoever is taking on the role of tutor in a live event
Though I do not profess to be a MySQL expert, INSTERT will definitely mess
things up for you as will the s at the end of values, given that you are
inserting multiple values :)
Richard.
- Original Message -
From: Jason Pruim <[EMAIL PROTECTED]>
Date: Friday, September 26, 2008 6:39 pm
S
When I did a search on "resource(5)" within the PHP online documentation, I
found the resource page resource.php. While although it lists all the resources
used with mysql, it does not mention how resources are related to resource
numbers as above. A query such as a row count on a table results
Can someone explain how I can translate Resource id #5 which is what I am
getting from the code below?
$result = mysql_query("Select answer from answers") or die(mysql_error());
$resultArray = explode(',',$result);
for ($i=0;$ihttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
This much is working:
The output is
1
1
which is correct.
One small step at a time, hopefully forward.
Richard.
--- Begin Message ---
Richard Dunne wrote:
In my code below, I am trying to verify that the query is selecting data from both rows of my answers table. I
In my code below, I am trying to verify that the query is selecting data from
both rows of my answers table. I have run the query on my MySQL CLI and
getting answers from both rows, but running this script I get $rows = 0. I
can't figure out why its not returning 2 for the number of rows. It
I did var_dump on the result resource and I got resource(5) of type (mysql
result).
--- Begin Message ---
On Mar 26, 2008, at 12:30 PM, Evert Lammerts wrote:
OK. Tried that and count comes back as 1.
So your query returns only one record. Try
$query ="Select answer from answers";
Why
id (and you wanted only
numbers):
$num = "A123456789";
$nums = string_to_array(preg_replace("/[^0-9]+/", "", $nums));
- Jon L.
On Wed, Mar 26, 2008 at 1:35 PM, Richard Dunne <[EMAIL PROTECTED]>
wrote:
> Using this extract from
> http://ie.php.net/manua
Using this extract from
http://ie.php.net/manual/en/control-structures.foreach.php
Amaroq
09-Mar-2008 06:40
Even if an array has only one value, it is still an array and foreach will run
it.
The above code outputs:
I'm an array.
-
So if I use:
$query = "Se
- Original Message -
From: Evert Lammerts <[EMAIL PROTECTED]>
Date: Wednesday, March 26, 2008 5:22 pm
Subject: Re: [PHP-DB] numeric string to single digit array
>
> > Tried that as well and got the same result.
> > I tried "Select count(answer) as total from answers where
> studentID=
- Original Message -
From: Evert Lammerts <[EMAIL PROTECTED]>
Date: Wednesday, March 26, 2008 4:30 pm
Subject: Re: [PHP-DB] numeric string to single digit array
>
> >
> > OK. Tried that and count comes back as 1.
> >
>
> So your query returns only one record. Try
>
> $query ="Sel
- Original Message -
From: Evert Lammerts <[EMAIL PROTECTED]>
Date: Wednesday, March 26, 2008 4:04 pm
Subject: Re: [PHP-DB] numeric string to single digit array
>
> > This is my code. The only error is at line 15 as I stated above.
> >
> > 1 > 2 DEFINE ("host","localhost");
> > 3 DEFI
- Original Message -
From: Evert Lammerts <[EMAIL PROTECTED]>
Date: Wednesday, March 26, 2008 3:39 pm
Subject: Re: [PHP-DB] numeric string to single digit array
>
> > PHP is telling me that the resource I am using for
> mysql_fetch_assoc is invalid:
> >
> > $query ="Select answer from
- Original Message -
From: Evert Lammerts <[EMAIL PROTECTED]>
Date: Wednesday, March 26, 2008 3:12 pm
Subject: Re: [PHP-DB] numeric string to single digit array
>
> > I ran this
> >
> > $query ="Select answer from answers where studentID ='A123456789'";
> > $result = mysql_query($query,
- Original Message -
From: Chris <[EMAIL PROTECTED]>
Date: Wednesday, March 26, 2008 2:18 am
Subject: Re: [PHP-DB] numeric string to single digit array
> Richard Dunne wrote:
> > Sorry for the top-posting, it's my mail client, not my design.
> I honestly
ingle digit array
>
> Please always CC the mailing list so others can learn and also
> contribute answers.
>
> Also please don't top-post as it makes it hard to follow discussions.
>
> Richard Dunne wrote:
> > I am using MySQL and retrieving a single column which co
Can anyone tell me how how to convert a string of integers into an array of
single digit integers. i.e. "1223123" into ['1','2,','2','3','1,'2','3'] ?
When I retreive a column of single digit integers I end up with a long string
of numbers. I think PHP is seeing this as one whole number and t
20 matches
Mail list logo