ad...@buskirkgraphics.com wrote:
> Before most of you go on a rampage of how to please read below...
>
> As most of you already know when using MySQL from the shell you can write
> your queries in html format in an out file.
>
> Example: shell>mysql -uyourmom -plovesme --html
> This now will r
ad...@buskirkgraphics.com wrote:
I tend to do this robert,
while looking at your example i thought to myself since i am trying to mimick a
shell command why not run one.
Result:
$ddvery";
?>
Not are the results safe but the unlimited possibilites are amazing. Thanks so
much for the kick sta
I tend to do this robert,
while looking at your example i thought to myself since i am trying to mimick a
shell command why not run one.
Result:
$ddvery";
?>
Not are the results safe but the unlimited possibilites are amazing. Thanks so
much for the kick starter
ad...@buskirkgraphics.com wr
ad...@buskirkgraphics.com wrote:
Would you mind giving me an example of this that i can stick right into a blank
php file and run.
I get what you are saying but i cant seem to make that even echo out the data.
php 5.2 mysql 5.1.3 Apache 2.2
Cheers,
Rob.
--
http://www.interjinn.com
Applica
ad...@buskirkgraphics.com wrote:
Before most of you go on a rampage of how to please read below...
As most of you already know when using MySQL from the shell you can write your
queries in html format in an out file.
Example: shell>mysql -uyourmom -plovesme --html
This now will return all
On Fri, September 15, 2006 7:35 am, Dave Goodchild wrote:
> Hi all. I am building an online events listing and when I run the
> following
> query I get the expected result set:
> Any ideas why not? I know it's more of a mySQL question so apologies
> in
> advance!
Well, you'd have to tell us what'
Also you should check if dates.date is a DATE type, not DATETIME. Lost
some time on that when I wanted to select enregs for a specific date,
field was DATETIME and I was querying `date` = '2006-01-01'... :p
Andy
Dave Goodchild wrote:
> On 15/09/06, Brad Bonkoski <[EMAIL PROTECTED]
On 15/09/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote:
Have you tried echoing out your query to run on the backend itself?
Maybe there is some problem with how your join is being constructed...
Perhaps a left outer join is called for? Hard to tell without having
knowledge of your table structure
Have you tried echoing out your query to run on the backend itself?
Maybe there is some problem with how your join is being constructed...
Perhaps a left outer join is called for? Hard to tell without having
knowledge of your table structure and table data...
-B
Dave Goodchild wrote:
Hi all.
* Thus wrote Victor C.:
>
> If i copy paste the string into phpMyAdmin SQL, the query executes
> successfully and returns one record.
>
> However, when I just do$returnValue = QueryDatabase($query);
> echo
> mysql_num_rows($ret
[snip]
$query = "select * from table1 where colum1 like '$email%'";
$returnValue = QueryDatabase($query);
echo mysql_num_rows($returnValue);
I always get 0 for the # of records.
[/snip]
You have not included the code from your QueryDatabas
single quote 'y'
Jason
On Sun, 25 Jul 2004 11:05:23 -0400, Karl-Heinz Schulz
<[EMAIL PROTECTED]> wrote:
> I have a simple question (not for me).
>
> Why does this query does not work?
>
> $links_query = mysql_query("select id, inserted, title, information,
> international from links WHE
Karl-Heinz Schulz wrote:
I have a simple question (not for me).
Why does this query does not work?
$links_query = mysql_query("select id, inserted, title, information,
international from links WHERE international = y; order by inserted desc
LIMIT 0 , 30");
The information for the "internati
[snip]
$dbh = mysql_connect("localhost", "login", "password") or
die('cannot connect to the database because: ' . mysql_error());
mysql_select_db("database");
$query = 'SELECT * FROM cities';
$result = mysql_query($query);
while ($row = mysql_fetch_row($result)) {
echo (' '
Steven Kallstrom wrote:
Hello all...
I'm embarrassed by this one... I think it should work but it isn't...
$dbh = mysql_connect("localhost", "login", "password") or
die('cannot connect to the database because: ' . mysql_error());
mysql_select_db("database");
$query = 'SELECT * FROM cit
* Thus wrote Steven Kallstrom ([EMAIL PROTECTED]):
> Hello all...
>
> I'm embarrassed by this one... I think it should work but it isn't...
>
> $query = 'SELECT * FROM cities';
> $result = mysql_query($query);
>
> while ($row = mysql_fetch_row($result)) {
>
> getting this error:
>
Try this,
$result = mysql_query($query,$dbh);
-Murugesan
- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Steven Kallstrom" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 4:50 PM
[snip]
This is not true, the resource link identifier is optional! If
unspecified,
the last opened link is used. My suggestion is to check the results of
mysql_error() for more information on the failed query.
[/snip]
You are right, of course...my sleepy brain just glanced at the code and
fired of
This is not true, the resource link identifier is optional! If unspecified,
the last opened link is used. My suggestion is to check the results of
mysql_error() for more information on the failed query.
HTH,
Ivo
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
$
I'm used to do like this:
$query = 'SELECT * FROM cities';
$result = mysql_query($query);
if($row = mysql_fetch_array($result))
do {
echo (' ' . $row[0] . ', ' . $row[1] . '
' . $row[2] . ' ' . $row[3] . " \n");
} while ($row = mysql_fetch_array($result));
-
Leif
Many thanks for that, your help is much appreciated. *smiles*
Steven M
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
mysql_query("update table set field=field+1 where whatever='whatever'");
Steven M wrote:
How do i make a form that will allow me to add 2 to the value of a MySQL
field? I am trying to change it from 75 to 77. Is this possible?
Thanks
--
The above message is encrypted with double rot13
I got it working. It did not like the single quotes around the column names.
"Chris Crane" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thank you. I will try that.
> "Justin French" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTEC
Thank you. I will try that.
"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Why don't you do
>
> $result = mysql_query($query) or die(mysql_error());
>
> or
>
> $result = mysql_query($query);
> echo mysql_error();
>
> That way, instead of "Query
Why don't you do
$result = mysql_query($query) or die(mysql_error());
or
$result = mysql_query($query);
echo mysql_error();
That way, instead of "Query Failed" you'll get something meaningful...
probably something that will solve the problem.
Justin French
on 26/08/02 11:55 PM, Chris Cran
There are 15 columns and 15 pieces of data. In my second post I fixed this
error and pasted it into PHPMYADMIN and it worked fine, but not here...
"Chris Crane" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Initially there was an error with too many values v
Initially there was an error with too many values verses columns. But I
think it was fixed. I am double checking now.
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
003201c24d07$b8560470$8102a8c0@000347D72515">news:003201c24d07$b8560470$8102a8c0@000347D72515...
> [snip]
> /* Performing
[snip]
/* Performing SQL query */
$query = "INSERT INTO SignupRequests ('FirstName', 'LastName',
'Address1', 'Address2',
'City', 'State', 'Zip', 'Email', 'Phone', 'ContactMethod', 'Date',
'IP', 'Status', 'Comments')
VALUES ('', 'Chris', 'Crane', '655 Talcottville Road', 'Apt. 185'
Yes, there is a problem.
--
SELECT *
FROM links
WHERE 1=1
and ( name LIKE "%te%"
OR description LIKE "%te%"
OR url LIKE "%te%" )
AND approved="1" LIMIT 5;
--
--- Jeff Lewis <[EMAIL PROTECTED]> wrote:
> Guys, why isn't this working? :)
>
> SELECT * FROM links WHERE name LIKE "%te%" OR descr
Whoops.. do SELECT DISTINCT
-Justin
-Original Message-
From: "Jeff Lewis" <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 1:08 PM
To: King, Justin; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP/mySQL Query
Yes but for the first query all I want to do is list the l
Yes but for the first query all I want to do is list the locations and not
multiple times
Jeff
- Original Message -
From: "King, Justin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 1:46 PM
Subject: RE: [PHP] PHP/mySQL Query
I'm assuming you're trying to join them and show resumeID also with this
SELECT r.resumeID,r.userID,u.location FROM resumes r,users u WHERE
r.userID=u.userID;
-Original Message-
From: "Jeff Lewis" <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 12:45 PM
To: [EMAIL PROTECTED]
Subject:
"Jeff Lewis" <[EMAIL PROTECTED]> wrote:
> I fought the urge to post this here but have to :(
>
> owners
> -ownerID
> -teamname
> -more fields
>
> teampages
> -ownerID
> -bio
>
> Anyway, I'm doing a select on the database like this: select ownerID,
> last_update FROM teampages ORDER BY last_update
SELECT t.ownerID, t.last_update, o.teamname
FROM teampages t, owners o
WHERE t.ownerID = o.ownerID
ORDER BY t.last_update DESC LIMIT 10
-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP/mySQL Qu
On Thu, 5 Jul 2001, Jeff Lewis wrote:
> owners
> -ownerID
> -teamname
> -more fields
>
> teampages
> -ownerID
> -bio
>
> Anyway, I'm doing a select on the database like this: select ownerID,
> last_update FROM teampages ORDER BY last_update DESC LIMIT 10
>
> The thing is, I want to get the team n
what you want to do is a join so it'd look something like this..
select teampages.ownerID, teampages.last_update, owners.teamname FROM
teampages, owners where teampages.ownerID= owners.ownerID ORDER BY
teampages.last_update DESC LIMIT 10
hopefully that will work! :)
jay
- Original Messag
On 09-May-01 Jon Haworth wrote:
be sure to check for the NULL :
if (isset($amyrow["date"])) {
>if ($amyrow["date"] == "-00-00 00:00:00") {
> echo "no date";
>} else {
> echo $amyrow["date"];
>}
}
On Sat, 28 Apr 2001, Andras Kende wrote:
> Hello,
>
> I pull some data from mysql with the php code below.
> On the date field if there is no date on mysql it displays : -00-00
> 00:00:00
>
> I would like to change this -00-00 00:00:00 to "no date" for example..
hmm... mysql can do this,
; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 9:09 AM
Subject: RE: [PHP] PHP Mysql query data conversion newbie
> Well, it's not immediately obvious whether your date is in "i", "j", or
"f",
> so let
Well, it's not immediately obvious whether your date is in "i", "j", or "f",
so let's pretend it's in "date" :-)
Try this:
while($amyrow = mysql_fetch_array($aresult))
{
echo "";
echo $amyrow["i"];
echo "";
echo $amyrow["j"];
40 matches
Mail list logo