Search Results

Showing results 1 to 40 of 266
Search took 0.03 seconds.
Search: Posts Made By: nav33n ; Forum: MySQL and child forums
Forum: MySQL 11 Days Ago
Replies: 2
Views: 298
Posted By nav33n
You can set a cron to run on every first day of the month, which will copy the record from main table to archive table[and delete entries in the main table].
We do it the same way in our company,...
Forum: MySQL 12 Days Ago
Replies: 3
Views: 428
Posted By nav33n
Sorry man. That's just not my area of expertise. :) Lets see if someone else can help you with this. Cheers!
Forum: MySQL 13 Days Ago
Replies: 1
Views: 344
Posted By nav33n
Check out tcpdf. It has around 40+ examples of writing pdf. It's easy. [Get the data from mysql, format it like html and create pdf on the fly!]
Forum: MySQL 16 Days Ago
Replies: 9
Views: 551
Posted By nav33n
You are welcome :)
Forum: MySQL 18 Days Ago
Replies: 3
Views: 428
Posted By nav33n
You *cannot* decrypt it. If you store sha1 of a string, while authenticating, convert the string to sha1 and compare it with the value in the table.
Forum: MySQL 19 Days Ago
Replies: 4
Views: 538
Posted By nav33n
Ofcourse you can. But for that, you should make sure all the required fonts are installed.
Forum: MySQL 19 Days Ago
Replies: 5
Views: 446
Posted By nav33n
Congrats on solving your problem. I am glad you learnt something new :)

If you post your answer, even others may get to learn something from this thread.
Forum: MySQL 19 Days Ago
Replies: 4
Views: 538
Posted By nav33n
Here is an example.

<html>
<body>
<ul>
<?php
for($i=65;$i<=90;$i++) {
echo "<li><a href='char.php?alpha=".chr($i)."'>".chr($i)."</a></li>";
}
?>
Forum: MySQL 19 Days Ago
Replies: 5
Views: 446
Posted By nav33n
Seems like you didn't read the member rules. (http://www.daniweb.com/forums/faq.php?faq=daniweb_policies)
Ch, ch. Read more on count and group by clauses. After reading them, you will be able to...
Forum: MySQL 19 Days Ago
Replies: 9
Views: 551
Posted By nav33n
Dude, datatype as in int, varchar, date, datetime, etc.

ALTER TABLE clown_contest MODIFY COLUMN `location` varchar(40) AFTER `state`

Clear ? :)
Forum: MySQL 20 Days Ago
Replies: 9
Views: 551
Posted By nav33n
You forgot the datatype! (doh, even I forgot it in the syntax).
Sorry, here is the right syntax.

ALTER TABLE tablename MODIFY COLUMN columnname datatype AFTER columnname

This works for sure!
Forum: MySQL 21 Days Ago
Replies: 9
Views: 551
Posted By nav33n
Hey, sorry. I misunderstood the question.

/*
ALTER TABLE tablename MODIFY COLUMN columnname AFTER columnname
*/
Eg. ALTER TABLE members MODIFY COLUMN date_of_birth date AFTER username
...
Forum: MySQL 21 Days Ago
Replies: 9
Views: 551
Posted By nav33n
Very simple.

ALTER TABLE tablename ADD columnname datatype AFTER columnname
Forum: MySQL 22 Days Ago
Replies: 6
Views: 703
Posted By nav33n
I am not sure about the logic you are using. Check your loops to see if its not looping unnecessarily. Print your query and see if its the query that is failing. :)
Forum: MySQL 26 Days Ago
Replies: 1
Views: 468
Posted By nav33n
Hi, If I understand your question right, this should do the trick.

select * from customers c, cust_packages cp
where c.cust_custnr = cp.cpack_usernr group by cpack_usernr
having count( * ) =1...
Forum: MySQL 27 Days Ago
Replies: 6
Views: 422
Posted By nav33n
I am little confused about this part.

If I get it right, When you insert a record to table B, you can get the id by using mysql's last_insert_id ...
Forum: MySQL 27 Days Ago
Replies: 6
Views: 422
Posted By nav33n
You are welcome. :)
Forum: MySQL 27 Days Ago
Replies: 6
Views: 422
Posted By nav33n
One suggestion. When you are inserting a record to the table, you don't have to insert 'NULL' if its an auto increment field. Mysql will do it for you.
Ie.,

$orange_insert = "INSERT INTO orange...
Forum: MySQL 33 Days Ago
Replies: 4
Views: 499
Posted By nav33n
Cool ! Congrats :)
Forum: MySQL 33 Days Ago
Replies: 1
Views: 439
Posted By nav33n
Hi, I am not sure how you are validating what mysql returns. In php, when you query the table, for example,

//query the table with username and password
$query = "select * from table where...
Forum: MySQL 33 Days Ago
Replies: 4
Views: 499
Posted By nav33n
Hi, can you elaborate your question ?
If you are inserting the value to the table from php, you can use substr (http://php.net/manual/en/function.substr.php) to insert only a part of a string. If...
Forum: MySQL Oct 7th, 2009
Replies: 4
Views: 460
Posted By nav33n
http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html Check for foreign key constraints, primary key, foreign key in google.
Forum: MySQL Oct 5th, 2009
Replies: 11
Views: 660
Posted By nav33n
Thats awesome! :)
Forum: MySQL Oct 5th, 2009
Replies: 7
Views: 460
Posted By nav33n
Umm.. I am not 100% sure if that is how you are supposed to write a query in java. As far as I can see, there is no need to use trigger in your case and its better you post your question in java...
Forum: MySQL Oct 5th, 2009
Replies: 7
Views: 460
Posted By nav33n
Can you explain how you are storing these values in the table ? Here is a simple example of what I am talking about. Its in php, but I am sure its not completely different from java.

<?php...
Forum: MySQL Oct 5th, 2009
Replies: 11
Views: 660
Posted By nav33n
Try this.

$query = "select * from table where Concat( column1, ' ', column2 )
LIKE '%".$search."%'";

This will return all the rows from the table where column1 concatenated with column2...
Forum: MySQL Oct 5th, 2009
Replies: 7
Views: 460
Posted By nav33n
Why don't you calculate the difference between starttime and endtime and insert the difference while inserting values to the first 2 columns ?
I haven't used triggers myself, but I think its...
Forum: MySQL Oct 5th, 2009
Replies: 3
Views: 431
Posted By nav33n
I am not sure if I understood your question right. As far as I understand your question,
1. you can't select a record/row from the table without knowing the column you are querying on. You should...
Forum: MySQL Aug 20th, 2009
Replies: 13
Views: 3,594
Posted By nav33n
I noticed, its your first post on Daniweb. Welcome to Daniweb! :)


P.S. Some people will never change. They are always whining.
:icon_rolleyes: Bah! Nevermind.
Forum: MySQL May 22nd, 2009
Replies: 2
Views: 2,289
Posted By nav33n
You should escape ' before adding it to the database.
Use,

$link = mysql_real_escape_string($_POST['link']);
$sql="INSERT INTO catalog (link)
VALUES ('$link')";

You got that error...
Forum: MySQL May 22nd, 2009
Replies: 6
Views: 703
Posted By nav33n
Nothing wrong with the query and it shouldn't go in an infinite loop. Can you post your script ?
Forum: MySQL May 19th, 2009
Replies: 4
Views: 390
Posted By nav33n
Do you want only mysql or do you also want a webserver (apache) and php with it ? If you want all these, then you can download WAMP. You just have to install the application. It will set up mysql and...
Forum: MySQL May 8th, 2009
Replies: 1
Views: 398
Posted By nav33n
Which server side language are you using ?
If you are using php, you can create a string like 10|11|12 and insert. While fetching these values from the table, use explode to split the values into...
Forum: MySQL May 7th, 2009
Replies: 2
Views: 493
Posted By nav33n
<offtopic> You should also consider using mysql_real_escape_string (http://in.php.net/mysql_real_escape_string) to prevent any kinda sql injections. </offtopic> :)
Forum: MySQL May 7th, 2009
Replies: 1
Views: 383
Posted By nav33n
Use rand (http://in2.php.net/rand) function if you want random numbers. If you want all the numbers between the 2 numbers specified, use a loop.
Forum: MySQL Apr 22nd, 2009
Replies: 3
Views: 931
Posted By nav33n
Most probably, you installed mysql separately. But as always, It will be inside the data directory :)
Forum: MySQL Apr 22nd, 2009
Replies: 3
Views: 931
Posted By nav33n
All the directories will be in data folder under mysql directory. If you have installed WAMP, for example, the databases will be in c:\wamp\mysql\data :) Look for data directory.
Forum: MySQL Apr 22nd, 2009
Replies: 2
Views: 453
Posted By nav33n
$query = "select * from table where id = 100";
$result = mysql_query($query);
if(mysql_num_rows($result) > 0 ) {
// record already exists
} else {
// record doesn't exist, so insert..
}
...
Forum: MySQL Apr 22nd, 2009
Replies: 14
Views: 1,489
Posted By nav33n
1. I would never use form element's names like, Y M D, ie., with spaces. Try,

<input id="dmy" name="dmy" type="text" />

And in the php script,

$date =...
Forum: MySQL Apr 17th, 2009
Replies: 1
Views: 1,924
Posted By nav33n
:icon_redface: After numerous attempts, I found out the solution. Here it is.

INSERT INTO a (name, age, postcode, city )
SELECT name, age, postcode, city
FROM b where counter = 1
AND NOT ...
Showing results 1 to 40 of 266

 


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

©2003 - 2009 DaniWeb® LLC