Hello,
I try your SQL statements. There is no problem on your SQL syntax
and you can use alias in the order by clause.:)
$SQL = SELECT EMail,count(EMail) AS repeated FROM mena_guests WHERE
Voted = 'yes' GROUP BY EMail ORDER BY repeated LIMIT
$startingID,$items_numbers_list;
--
Luchino - Samel wrote:
*Question No. 01*
there are some kind of foreign key in database
Some of them want give any error when you delete from the table where the
foreign key is in, this cause the remove is recursive and it delete
also
the ORDER linked to the CUSTOMER (CASCADE foreign key).
In
*Question No. 01*
there are some kind of foreign key in database
Some of them want give any error when you delete from the table where the
foreign key is in, this cause the remove is recursive and it delete also
the ORDER linked to the CUSTOMER (CASCADE foreign key).
In other kind of foreign key
Ron Croonenberg wrote:
Hello all,
Is there a discussion list for MySQL queries (I have a rookie MySQL
query question and don't want to bug this list with it)
http://lists.mysql.com/
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
howdy
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Ron Croonenberg [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Thursday, March 22, 2007 7:06 AM
Subject: Re: [PHP-DB] MySQL queries
Ron Croonenberg wrote:
Hello all,
Is there a discussion list for MySQL queries (I have
too small a sort space on the server? have you checked the server config?
Bastien
From: Tony Grimes [EMAIL PROTECTED]
To: PHP-DB php-db@lists.php.net
Subject: [PHP-DB] MySQL sort stopped working
Date: Tue, 13 Mar 2007 13:22:25 -0600
I have this page that lists artists alphabetically:
Tony Grimes wrote:
I have this page that lists artists alphabetically:
http://www.wallacegalleries.com/artists.php
At least it did until today. Nobody made any changes to the files, but the
database stopped sorting by artist_id. The list shown is just the default
order that mysql spits out if
, bedul wrote:
- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem
Strange. If you look at the users table
I did the reload, but with no effect...
On Sat, 3 Mar 2007 09:17:36 +0700, bedul wrote
- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql
*Subject:* Re: [PHP-DB] Mysql autentication problem
Reloading the grant tables should happen almost immediately unless
you have an extremely large set of users, very little memory, or a
very slow computer.
On 03/02/2007 06:17 PM, bedul wrote:
- Original Message
Hi,
So it works from PHP w/o a password, but with a password does not? What are
you using for a password? I don't mean post it here, but are there any
'funny' characters in it? I've had trouble because of that before, on other
systems. Try a dumb, obviously OK password, like 'apples' and see
Ted,
I try the classic abc and had the same problem...
Roberto
Ted Fines escreveu:
Hi,
So it works from PHP w/o a password, but with a password does not?
What are
you using for a password? I don't mean post it here, but are there any
'funny' characters in it? I've had trouble because of
Hi,
When you're connecting from your PHP script, are you connecting from the
same machine that the db is on, or a different one? If a different one,
you'll need to do grant commands like:
grant all privileges on mydbname.* to 'mydbuser'@'myhostname.mycompany.net'
identified by 'mypassword';
have you tried to 'flush privileges' to get the server to recognize the user
account. Another option might be to open the mysqld from the command line
and use the GRANT statement to create user without the gui.
bastien
From: Roberto F Tavares Neto [EMAIL PROTECTED]
To: php-db@lists.php.net
I tried both already. It does not work.
Roberto
Bastien Koert escreveu:
have you tried to 'flush privileges' to get the server to recognize
the user account. Another option might be to open the mysqld from the
command line and use the GRANT statement to create user without the gui.
bastien
Ted,
The [EMAIL PROTECTED] does the same effect as 'mydbuser'@'myhostname.mycompany.net'
, right?
Btw, for web apps, I got another user, @localhost only. This user is
working...
I thought it was a problem on the GUI, so I tried a [EMAIL PROTECTED] from
mysql command line. It fails too...
Did you give the user permissions to use the database in question?
Here's my sequence of actions:
.
1) Create DB if it doesn't exist
2) Create the user w/password
3) Give the user permission to use the database.
4) Flush privileges to update the server.
5) login and enjoy.
-Micah
Roberto F
Micah:
I did create the database. Then, I use the:
GRANT ALL PRIVILEGES ON db.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'
to do the 2 and 3 steps.
FLUSH PRIVILEGES
to do the step 4.
But the step 5 really does not work... only on the shell or when I
remove the password from the user...
Strange. If you look at the users table, is there a password hash in the
password field?
Roberto F Tavares Neto wrote:
Micah:
I did create the database. Then, I use the:
GRANT ALL PRIVILEGES ON db.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'
to do the 2 and 3 steps.
FLUSH PRIVILEGES
to
- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem
Strange. If you look at the users table, is there a password hash
PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem
Strange. If you look at the users table, is there a password hash in the
password field?
i think this must be reload?? not just flush?? it happen to me
Subject: Re: [PHP-DB] Mysql autentication problem
Reloading the grant tables should happen almost immediately unless you have
an extremely large set of users, very little memory, or a very slow computer.
On 03/02/2007 06:17 PM, bedul wrote:
- Original Message -
From: Micah Stevens
No, it shouldn't because there are only two B's, one is followed by a
'v' (one of your exceptions) and the other is at the end of the line, right?
-Micah
Mike van Hoof wrote:
That is it almost :)
SELECT 'oer bv b' REGEXP 'b[^v]$|b[^v]\s?';
gives me 0 as a result, while it shoud give me 1,
Your code states:
Match: one of the following letters: -,b,|,^,b negative look ahead one
of these: -,v,$,|,v
Which isn't what you're looking for. Remember the negating '^' only
works at the start of a [] list. And '$' only means line-end if it's
outside [], inside it stands for the '$'
christine wrote:
Hi, I would ask which way is more efficient and save time? Save each row to
array or mysql_data_seek(0) ?
Probably mysql_data_seek(0).
That just resets the mysql pointer back to the start and so it doesn't
re-run the query or anything like that and doesn't take up any extra
Hi
Hi, I would ask which way is more efficient and save time? Save each row to
array or mysql_data_seek(0) ?
That totally depends on which resources are more valuable to you.
The array will likely use more memory but be faster to process.
While mysql_data_seek(0) would probably use no
Hi
Try:
SELECT fkid, MAX(foo), bar FROM table GROUP BY fkid ORDER BY bar DESC
Niel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
select max(bar) from mytable where unique fkid order by bar asc
as far as I remember!!
-Original Message-
From: Peter Beckman [mailto:[EMAIL PROTECTED]
Sent: Lunes, 13 de Noviembre de 2006 04:59 p.m.
To: PHP-DB Mailing List
Subject: [PHP-DB] MySQL SQL Query Help
I have a table:
id
Actually, that should not work, it should give you an error.
This should work:
SELECT `fkid`,max(`foo`) as foo,`bar` FROM `test2` GROUP BY `fkid` ORDER BY
`bar` ASC
Miguel Guirao wrote:
select max(bar) from mytable where unique fkid order by bar asc
as far as I remember!!
On Mon, 13 Nov 2006, [EMAIL PROTECTED] wrote:
Actually, that should not work, it should give you an error.
This should work:
SELECT `fkid`,max(`foo`) as foo,`bar` FROM `test2` GROUP BY `fkid` ORDER BY
`bar` ASC
Yes, but if the data is in a different order that fails and doesn't maintain
Peter Beckman wrote:
On Mon, 13 Nov 2006, [EMAIL PROTECTED] wrote:
Actually, that should not work, it should give you an error.
This should work:
SELECT `fkid`,max(`foo`) as foo,`bar` FROM `test2` GROUP BY `fkid`
ORDER BY `bar` ASC
Yes, but if the data is in a different order that fails
sorry, i meant that i wanted to remove the oldest entry and put in a
new entry with UPDATE or INSERT.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
whynot keep all and just sort/limit them to get the data you want?
bastien
From: bob plano [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql databases
Date: Sat, 14 Oct 2006 12:47:38 -0500
sorry, i meant that i wanted to remove the oldest entry and put in a
new entry
Hi Bob
Your question isn't very clear. Do you want to remove the oldest entry,
newest, or is there some other criteria to diceide?
Niel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
He means that he wants to use REPLACE and take out the old entry and update
it with a new one. Although, you would probably use UPDATE instead.
--
Dave W
Hi
He means that he wants to use REPLACE and take out the old entry and update
it with a new one. Although, you would probably use UPDATE instead.
Hmmm... Thought this was DB list, not mind-readers.
I would also *guess* that would be the intention, but his example seems
to remove the newest
if you have these as strings, I would recommend a column data type
conversion to int(or other numeric as the case may be)failing that I
would use the CAST command to convert the data to numerics
see here
http://dev.mysql.com/doc/refman/4.1/en/cast-functions.html
to use
select
One thing I've done in situations like this is just load your returned DB data
into an array. Something like this would do:
$dvdarr[$result['call_number']]['Title'] = $result['title'];
$dvdarr[$result['call_number']]['Publisher'] = $result['publisher'];
I approach this by assigning a value to a variable and then comparing to see
if i need to write out a new title
$oldDVD = ;
while ($rows=mysql_fetch_array($result))
{
//decide whether to show the DVD title
if ($oldDVD != $rows['title'])
{
echo trtd.$rows['title']./td/tr;
$oldDVD =
Some good examples of how to deal with this in PHP have already been
given, especially the associative array solution.
The question I have is with something like this, how do you weight out
the pros/cons of code development versus speed?
i.e. for code development breaking the logic up into 2
Thanks to Bastien and TG for their suggestions. I'd been looking at
it Bastien's way, but TG's is probably better suited to what I want to
do. I'd forgotten about that possibility, cramming it all into an
array . . . .
Again, thanks for the help,
Andrew
p.s. I'd be curious about the relative
test both and let us know
bastien
From: Andrew Darby [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: Re: [PHP-DB] MySQL/PHP Left Join Question
Date: Thu, 25 May 2006 12:33:15 -0400
Thanks to Bastien and TG for their suggestions. I'd been looking at
it Bastien's way, but TG's is probably
Bevan Christians wrote:
Is there any to query a mysql table to get it to return the field
names that it currently
has marked as Fulltext Indexes?
|SHOW COLUMNS FROM sometable
-Stut
|
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Anyone have any idea how i can query the tables in order to get it to
return the indexes
show indexes from tablename;
http://dev.mysql.com/doc/refman/5.0/en/show-index.html
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To
thanks muchly for the help guys :D
On 24/05/06, Chris [EMAIL PROTECTED] wrote:
Anyone have any idea how i can query the tables in order to get it to
return the indexes
show indexes from tablename;
http://dev.mysql.com/doc/refman/5.0/en/show-index.html
--
Postgresql php tutorials
LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata (col1,col2,...);
Syntax isn't quite correct with field and line terminators specified.
You must also specify a column list if the order of the fields in the
input
file differs from the order of the columns in the table. Otherwise,
MySQL
Am Dienstag, 16. Mai 2006 17:40 schrieb [EMAIL PROTECTED]:
Greets,
I'm trying to use the load data infile syntax within a php script. The data
is in csv format. I was under the impression that I could reorder the
fields during the insert, such as:
load data infile 'currentData.txt' into
Am Dienstag, 16. Mai 2006 17:40 schrieb [EMAIL PROTECTED]:
I'm trying to use the load data infile syntax within a php script. The
data
is in csv format. I was under the impression that I could reorder the
fields during the insert, such as:
load data infile 'currentData.txt' into
--default-storage-engine option in your options file (my.ini) where
engine is the the type of table engine you want to use, in your case MYISAM.
If you cant change that then specify the engine type every time you
create a table:
create table table_name{
.
} TYPE=myisam;
Regards
I have been using MySQL for quite some time and am now running Server
4.1. I
have been developing custom web-based software for a customer and
recently
moved their server to a different machine. I have everything running
smoothly EXCEPT for mySQL. Any time I try to start the service I get an
On 3/14/06, Eustace [EMAIL PROTECTED] wrote:
Hello,
I hope somebody can assist. I am using dreamweaver 8, Mysql, PHP5 for a
simple we application. After using the dreamweaver wizard to make a
connection, then created a recordset. Trouble starts when I use
require_once(connections/ConnSAFDEM)
To: [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Mysql/PHP5 connection error
On 3/14/06, Eustace [EMAIL PROTECTED] wrote:
Hello,
I hope somebody can assist. I am using dreamweaver 8, Mysql, PHP5 for
a simple we application. After using the dreamweaver wizard to make
\safdem_web\Admin\Connections\connSAFDEM.php
because that's what the server is looking for.
-Original Message-
From: chris smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 14, 2006 12:04 PM
To: [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Mysql/PHP5 connection error
Never trust DW to do the testing for you. I never user DWs built in server
stuff to test...create it and then test it thru the browser like it would
actually operate.
Bastien
From: Eustace [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: RE: [PHP-DB] Mysql
You need to separate the SET arguments with commas, not ANDs...
It's really doing something like this:
UPDATE shop_customer SET eu_vat_number = (SK1234567890 AND vat_amount = 0
AND total_amount = 8.4925) WHERE customer_id = 7 AND hash=dcd5e751
(SK1234567890 AND vat_amount = 0 AND total_amount =
Message-
From: Jenaro Centeno Gómez [mailto:[EMAIL PROTECTED]
Sent: 04 March 2006 17:35
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL update statement problem
Maybe I am wrong, biut isn´this the rigth way to do this:
UPDATE shop_customer SET eu_vat_number = SK1234567890, vat_amount =
0
Forgive me that this isn't really PHP related, but solely MySQL.. but
the MySQL mailing lists drive me nuts and figured someone here would
have a quick answer.
I'm trying to sort by a date and time field(s) (two separate fields).
It's a dumb system but until we do the next revision, it's
Unfortunately, no. The dates and times are stored as text. So here's what I
get:
2006-01-10 07:00 PM
2006-01-10 08:00 PM
2006-01-10 09:00 AM
2006-01-10 09:00 PM
(notice the AM out of order)
For anyone interested, here's the big ugly version.. if anyone knows of a
function that I can use
Ahh! Thank you Philip! That's what I was looking for! I see what I did wrong
now.
I was using the date format strings wrong. I was using it like I'd use it for
DATE_FORMAT() instead of as an input filter.
This is what I was trying to do:
select STR_TO_DATE('2003-11-05 06:00 PM', '%Y-%m-%d
Youcould also try CASTing
(http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html) the data
Bastien
From: [EMAIL PROTECTED]
To: php-db@lists.php.net
CC: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL date casting..
Date: Tue, 17 Jan 2006 12:51:44 -0500
Ahh! Thank you Philip! That's
This is not the problem.
The query fails when there is, as examples, an invalid syntax in the query
or the table is not found.
However, if the query executes but updates nothing. How can I know when the
update has changed a row or not? Not changing a row does not return a
failure.
Matt's
Please forgive me as I've been working with C# recently so my PHP is a
little rusty. But if I'm reading this correctly...
If your query fails outright, your function is going to return false:
if (!(@ mysql_query($query, $connection))) {
$this-errors = array(mysql_errno(), mysql_error());
SELECT c.eventid, e.ID
FROM col_links c left outer join calendar_v2 e
ON c.eventid = e.ID
where e.id is null
LIMIT 0, 999;
From: Keith Spiller [EMAIL PROTECTED]
To: [PHP-DB] php-db@lists.php.net
Subject: [PHP-DB] MySQL Query
Date: Sat, 19 Nov 2005 19:29:25 -0700
Hi,
I'm tring to run this
Multiple query can only be done in PHP 5 with MySQLI extension.
In PHP 4 maybe you can use an array to store the query and execute each
query with foreach :
?php
$query[] = UPDATE bla.. bla..;
$query[] = UPDATE bla.. bla..;
$query[] = UPDATE bla.. bla..;
foreach ($query as $eachquery){
You can't stack queries this way. PHPMyAdmin parses out the queries based on
the ';'. You will need to run the query after each one is created.
Bastien
From: Malcolm JC Clark [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] MYSQL IN A PHP LOOP
Date:
Thanks a lot. Ive just been reading them up on the MySQL website, and
they seem really useful, so this really helps.
Mark
On 03/11/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
It is possible using PHP 5. Simply make a query like this:
Select name_of_procedure(parameter1,parameter2,...);
That's a very common one. You're on windows, right?
Try putting in consider upgrading MySQL client into google. The first one
I found was this one:
http://www.experts-exchange.com/Web/Web_Languages/PHP/PHP_Windows/Q_21252231
.html
Although the guy first claims it's not the OLD_PASSWORD problem,
try downloading the mysqli library (perhaps by grabbing all of version 5)
and copying that into the extension folder for your 4.3.3 install of
PHP...add the below line to the ini file :
extension=php_mysqli.dll
bastien
From: W Roothman [EMAIL PROTECTED]
Reply-To: W Roothman [EMAIL
The code looks correct so my guess is that you are parsing it inorrectly in
actionscript...
Bastien
From: Juan Stiller [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] MySQL query result with some errors!
Date: Tue, 11 Oct 2005 18:14:42 -0300 (ART)
Hi,
Im trying to get a query
does your web server, php and db all use the same charset? they all should
match
From: Dominik Fi¹er [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] MySQL in PHP5 - problem with charset
Date: Sun, 11 Sep 2005 14:35:44 +0200
I have problem with MySQL in PHP 5.0.4 (WIN XP). I
I think yes. PHP default_charset = win-1250, mysql: def. char. set cp1250,
apahce 2: AddDefaultCharset WINDOWS-1250 (AddCharset WINDOWS-1250 .cp-1250
.win-1250)
With php4 with same configuration apache2 and mysql server is all OK.
Bastien Koert [EMAIL PROTECTED] pí¹e v diskusním pøíspìvku
try adding some debug code to the statement execution
$query=mysql_query ($sql, $connessione) or die (error is .mysql_error());
to get an error message that can help debug the query
bastien
From: Marco Strullato [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] mysql not valid
Marco,
Have you tried echoing out the sql statement to the browser before it gets
sent to the database? That would show you the exact query string and give
you a chance to see where the error might reside.
$sql=select distinct des_riga, count ( des_riga ) as freq from k_riga
where id_tabella= .
A thought - if he's getting the 'not a valid resource' from just the
code he posted, then his problem is with the $connessione variable, and
not the query itself. Check to make sure the connection is up at
all/etc. and *it* is a valid resource. Generally (well, in the simple
case - which is
4 does not come with the mysqli extension. You would need to download it
(seprately or as part of the php5 module) and then move the extension
aapropriate folder...
Bastien
From: Andre Matos [EMAIL PROTECTED]
To: 'PHP-mailist (PHP-mailist)' php-db@lists.php.net
Subject: [PHP-DB] MySQL 4.1
On Thu, June 30, 2005 9:05 pm, blackwater dev said:
Does anyone know if it is possible to load data into multiple
tables using one file when you use load data local infile?
That is not possible.
I need to load several tables but don't want to have tons of files.
You may need to change your
This is what I use when needing to do this:
1. Put all the values you want to search for in an array $vals (loop
around the first result)
2. $query =
select count(Nome) from Aeromodelistas
where year(AnoQuota)=2005
and Sexo='Masculino' and Distrito IN .sqlIn($vals)
;
function
I was confused for a moment about the use of the two checkboxes in your
request -- now I understand that you actually use the word checkbox for
two different items in your post. 1) is for the field in the table where
binary data is fetched and 2) is for an actual HTML form checkbox that is to
On Thu, 9 Jun 2005, Ron Piggott wrote:
I created a PHP based mailing list that sends out a Bible verse and a
quotation each day. Today's verses were:
[snip]
Let me show you some code:
It selects a Bible verse:
SELECT * FROM bible ORDER BY RAND() LIMIT 1
On a side note, this is going to
have a look at http://www.webmasterworld.com/forum88/3653.htm
hope this helps!
Mike
ioannes wrote:
I usually use INNER JOIN to link tables together in a straight line,
like a branch. Can I use it to link tables like twigs stemming off
the branch. If so, do I use:
SELECT
TABLE1.FIELD,
At 09:01 PM 5/1/2005, Chris wrote:
Hi,
I've got question on using LOCK TABLES with MySQL and PHP.
I don't have a great understanding of LOCK TABLES, but I'll lay out my
situation:
I've got a table and a PHP function to rebuild several columns in this
table. I need to read these columns from
Miles Thompson wrote:
At 09:01 PM 5/1/2005, Chris wrote:
Hi,
I've got question on using LOCK TABLES with MySQL and PHP.
I don't have a great understanding of LOCK TABLES, but I'll lay out
my situation:
I've got a table and a PHP function to rebuild several columns in
this table. I need to read
On Thursday 21 April 2005 13:41, Ong Teng Siong wrote:
I am using mysql 4.1 and php 5.0 in my WINDOWS XP. I
am trying to use it. But, this error msg eccurs.
Fatal error: Call to undefined function
mysqli_connect() in c:\Inetpub\wwwroot\mysql_up.php
Your PHP installation does not support the
When checking for unmatched records, you use a left join as you are
doing. This assures all records are retained from the left side table
(i.e. employees), regardless if there is a matching record or not.
Obviously if you have a filter on the left side table it will narrow
down the result.
Get those with transaction into a php array
Get those without transaction into a php array
Then use array_diff() (or one of its variants)
graeme.
jinxed wrote:
I am still new to this, but I turned the manual upside down, or at least I
tried.
I am designing a payroll application by which payslips
is there a join in the sql? Joins can be tricky since the order of the joins
can determine the number of records selected from each table. If the joins
result in a larger table joining with a smaller table, it could result in
more than 30% of the rows being selected and the optimizer will
You are probably running mysql 3.x if you move to 4.x or the beta 5.x you can use subqueries and even user functions in 5.x
hope this helps...
On Thu, 2005-04-07 at 08:50 +0200, Juffermans, Jos wrote:
Hi,
I'm afraid I can't help you with the query - I'm used to Oracle which as a
bigger
Jeffrey D. Means wrote:
I am trying to connect to a DB on a difrent server but mysql keeps
connecting to the local server via the socket. What is going on?
-- code snippet--
$connection = mysql_connect(mysql.meanspc.com:3306, Removed,
Removed);
Well try some debugging :
$connection =
Hi,
I'm afraid I can't help you with the query - I'm used to Oracle which as a
bigger set of SQL commands.
I can help you with your PHP question. If you want to put a variable in a
query, you can add the variable directly into the string:
$sql_query = select zg_longitude from zip_code
From memory earlier versions of MySQL don't support subselects. The
latest (and greatest) does so you may want to check the version you are
using - I can't remember when it was introduced, I have since switched
to PostGreSQL...
all the best,
graeme.
Juffermans, Jos wrote:
Hi,
I'm afraid I
subselects are available as of 4.1
bastien
From: graeme [EMAIL PROTECTED]
To: Juffermans, Jos [EMAIL PROTECTED]
CC: 'php-db@lists.php.net' php-db@lists.php.net
Subject: Re: [PHP-DB] MySql and PHP question
Date: Thu, 07 Apr 2005 12:55:13 +0600
From memory earlier versions of MySQL don't support
only mysql 4.1+ supports subqueries..if you version is lower it won;t work
Bastien
From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] MySQL Subquery problems...
Date: Wed, 30 Mar 2005 09:25:36 -0600
I am working with one of our Oracle DBAs to have him
-
From: Bastien Koert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 9:35 AM
To: NIPP, SCOTT V (SBCSI); php-db@lists.php.net
Subject: RE: [PHP-DB] MySQL Subquery problems...
only mysql 4.1+ supports subqueries..if you version is lower it won;t
work
Bastien
From: NIPP, SCOTT V (SBCSI
yeah...errora are important. I do not escape my quotation marks in a
query. I use single quotes within my insert and select statements.
If it says No valis MySQL resource then you are returning 0 records
which may be caused by escaping the quotations.
I follow this pattern
$sql =INSERT INTO
-db@lists.php.net
Subject: Re: [PHP-DB] MySQL query problems...
Date: Thu, 24 Mar 2005 08:35:56 -0500
yeah...errora are important. I do not escape my quotation marks in a query.
I use single quotes within my insert and select statements.
If it says No valis MySQL resource then you are returning 0
: J. Connolly [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 24, 2005 7:36 AM
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] MySQL query problems...
yeah...errora are important. I do not escape my quotation marks in a
query. I use single quotes within my insert and select statements.
If it says
um, the errors might be helpful
bastien
From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] MySQL query problems...
Date: Wed, 23 Mar 2005 17:18:44 -0600
I am getting errors for the following queries. This query seems
to work fine in phpMyAdmin.
Unlike ASP, $result1 is a handle to the dataset, not the data set itself.
You need to access the data first and then incorporate that into your query
like this:
$l = 2;
$result1 = (SELECT * FROM Drivers WHERE League = $l);
$row = mysql_fetch_array($result1);
$driverID = $row['DriverID'];
I am looking to do the following w/ MySQL and PHP. Have 1 query that
gets
results, then use those results in another query:
$l = 2;
$result1 = (SELECT * FROM Drivers WHERE League = $l);
$result2 = mysql_query(SELECT DriverID, Driver, CarNbr FROM Drivers
LEFT
JOIN $LeagueList ON
James wrote:
I'm pretty new to this...I've set this book example up on my PC and it's
fine.
I've attempted this on two Macs...
Here's the error I get when I try to run the application. What does the
error mean?
UNHANDLED ERROR on line 84 in
101 - 200 of 916 matches
Mail list logo