Search Results

Showing results 1 to 14 of 14
Search took 0.01 seconds.
Search: Posts Made By: darkagn ; Forum: MySQL and child forums
Forum: MySQL 34 Days Ago
Replies: 2
Views: 557
Posted By darkagn
In PHP the strtotime (http://au2.php.net/manual/en/function.strtotime.php) and date (http://au2.php.net/manual/en/function.date.php) functions might be useful to you. You can go:

for($i=0; $i<10;...
Forum: MySQL Apr 7th, 2009
Replies: 3
Views: 1,040
Posted By darkagn
Upsilon is very close with that query. I will extend to give you the minimum value:

SELECT min(value) as value FROM table_name HAVING count(value) = 1
Forum: MySQL Apr 3rd, 2009
Replies: 7
Views: 767
Posted By darkagn
> Sorry about this, I really am at a loss with all this.
No need to apologise, that's why this forum is here :)

The foreign key in table t1 is definately referencing itself. And the field in...
Forum: MySQL Apr 3rd, 2009
Replies: 7
Views: 767
Posted By darkagn
Are you able to check the FK on that table? You can do this at the mysql prompt like so:

mysql > SHOW CREATE TABLE t1\G
Forum: MySQL Apr 3rd, 2009
Replies: 7
Views: 767
Posted By darkagn
So you are trying to insert to t1 and you get that error? I must admit I didn't think it was possible to have such a foreign key constraint as one that references itself. I think if that's the case...
Forum: MySQL Apr 3rd, 2009
Replies: 7
Views: 767
Posted By darkagn
A foreign key constraint is used to stop you from inserting data into the table without a corresponding record existing in another table. The ID field in the table you are inserting into must match...
Forum: MySQL Mar 27th, 2009
Replies: 9
Solved: Pimp my Code?
Views: 460
Posted By darkagn
Also, if you are receiving an SQL error, it may not necessarily be output to screen. Try this after you run your query:

if( $result == false )
{
echo mysql_error( $link );
}


Again, $link...
Forum: MySQL Mar 27th, 2009
Replies: 9
Solved: Pimp my Code?
Views: 460
Posted By darkagn
1. I believe that is the name of his database, not a type of field.
2. I believe in his first post he has listed the actual query.
Forum: MySQL Mar 27th, 2009
Replies: 9
Solved: Pimp my Code?
Views: 460
Posted By darkagn
Yes, the documentation does seem to imply that. Maybe just try it to make sure?

This is certainly very strange. Maybe try explicitly stating the connection when you call mysql_query, like so:
...
Forum: MySQL Mar 27th, 2009
Replies: 9
Solved: Pimp my Code?
Views: 460
Posted By darkagn
Hi cvarcher / Rick and welcome to DaniWeb :)

All of your code looks ok to me, so I am going to ask a few obvious questions:

Firstly, is there a record in the jos_membership table with the...
Forum: MySQL Mar 21st, 2009
Replies: 2
Views: 481
Posted By darkagn
This looks to be more of a PHP question than a MySQL question, but I think I can help. I would assign the results to variables in php and then simply add them. Like so:

$w = $row_standings['w'];...
Forum: MySQL Mar 13th, 2009
Replies: 4
Views: 918
Posted By darkagn
So you will need to join the tables like so:

SELECT resortloc, resortname FROM table1
INNER JOIN table2 ON table1.resortid = table2.resortid
WHERE table1.resortloc = (SELECT MAX(resortloc) FROM...
Forum: MySQL Oct 9th, 2008
Replies: 5
Views: 1,053
Posted By darkagn
After you have created your eventStudent table can you DESCRIBE it?

DESCRIBE eventStudent;

If not, then the table has not been created. Like I said, you need to run your SQL file before trying...
Forum: MySQL Oct 7th, 2008
Replies: 5
Views: 1,053
Posted By darkagn
First, make sure that the SQL file has statements that read like this:

CREATE TABLE IF NOT EXISTS Example
-- table definition goes here

Then you actually need to run the mysql query by typing...
Showing results 1 to 14 of 14

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC