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 =
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 landavi...@gmail.com
To:
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
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 da...@dmcentral.net
To: php-db@lists.php.net
Sent: Thursday, March 18, 2010 12:07 PM
Subject: Re: [PHP-DB] Online PHP-Mysql Meeting
I think
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
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
as $a)
{
echo $a;
}
?
The output is
1
1
which is correct.
One small step at a time, hopefully forward.
Richard.
---BeginMessage---
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 have run
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;$isizeof($resultArray);$i++)
{
echo $resultArray[$i];
}
--
- 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 have not even looked at myphpadmin
- 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 =
- 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 answers
- 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 ?PHP
2 DEFINE (host,localhost);
3 DEFINE
- 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 =Select answer
- 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
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.
?php
$arr[] = I'm an array.;
if(is_array($arr))
{
foreach($arr as $val)
{
echo $val;
I did var_dump on the result resource and I got resource(5) of type (mysql
result).
---BeginMessage---
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 not
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
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 consists
of single digit integers. I have been doing
18 matches
Mail list logo