Jump to content

s0urce

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by s0urce

  1. You don\'t build relationships directly. Rather you query the database (when the data is already there) as if the tables are related, using table joins. s0urce
  2. uhh... :oops: Loks like the field was too small. I made it bigger and it now works. Thanks, S0urce
  3. It creates a new table every day? That\'s horrible! In order to change this, you\'d need to make some really big modifications to both the code AND the database. If I may, I\'d suggest another counter. They aren\'t really worth a table a day, and it\'s pointless to make any modifications at all, since there are much more efficient counters out there. s0urce
  4. You could add a date and time column(s) in a single table and then calculate your averages, etc. using the info they contain. However, I am not sure as to how fast/slow that would be. And, you\'d need a modification to your code. s0urce
  5. Hi. The only way I know of that you could do that is that you do it manually. Search for the highest id in all of your tables, then increase by one and add a new entry. This is an odd thing to do though. I always try to keep my id\'s from 1 to infinity (actually, 65536) in all tables, no matter what. What are you trying to do? There might be a better solution. Source
  6. I have the following lines in my php code: [php:1:46b06602e6]<?php $Query1 = \"insert into table values (NULL, \'$user\', PASSWORD(\'$pass\'))\"; $Result1 = mysql_query($Query1, $DB); $Query2 = \"select * from table where user=\'$user\' and pass=PASSWORD(\'$pass\')\"; $Result2 = mysql_query($Query2, $DB); echo mysql_num_rows($Result2); ?>[/php:1:46b06602e6] (column names are correct) What is echoed is the number of rows returned. The number echoed is zero (0). How is that possible? Am I doing something wrong? The same thing happens when I use an MD5 function. Also, I tried inserting new row with phpMyAdmin, and then reading it in php, but still it returned nothing. I also tried adding a new row in a console window, then reading it (with select) in a console window, and mysql returned an empty set. However, when I try doing it without using mysql functions, then it works. For example, this works perfectly: [php:1:46b06602e6]<?php $Query1 = \"insert into table values (NULL, \'$user\', \'$pass\')\"; $Result1 = mysql_query($Query1, $DB); $Query2 = \"select * from table where user=\'$user\' and pass=\'$pass\'\"; $Result2 = mysql_query($Query2, $DB); echo mysql_num_rows($Result2); ?>[/php:1:46b06602e6] What\'s wrong with the functions? S0urce
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.