Jump to content

nysebamse

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Everything posted by nysebamse

  1. Then this might solve it: <?php $dbname = \'db_name\'; if (!mysql_connect(\'localhost\', \'user\', \'password\')) { print \'Could not connect to mysql\'; exit; } mysql_select_db("$dbname"); $query = "show tables"; $result = mysql_query($query); $num_results = mysql_num_rows($result); print "There are $num_results tables.<br>"; for ($i = 0; $i < $num_results; $i++) { $row = mysql_fetch_array($result); print "table: " . $row[0] . "<br>"; } ?>
  2. This should sort it out: http://no.php.net/manual/en/function.mysql...list-tables.php
  3. What message do you get?
  4. I suggest you talk to the sales executives in the company you are working for - the should the best to know how the forecasting should work. Then you do the coding
  5. What kind of site are you building?
  6. Please post your error message and the code
  7. Id like a query that only selects unique data, that is if the data exists in more than one row it will only select the first instance. Is this possible? Im planning to use this in a table that holds ip-adresses.
  8. hey Im not sure actually. Never used more than one AND myself, by try it out and let me know
  9. Hey Say someone goes to this url: www.somedomain.com/file.php?cust_type=5&cust_subtype=Other the query could act according to the url like this: $query="SELECT * FROM customers WHERE cust_type=\'".$_GET[\'cust_type\']."\' AND cust_subtype=\'".$_GET[\'cust_subtype\']."\'"; the $_GET fetches the GET value from the url (?variable=value)
  10. Hey Nat Do you want to make to mysql query act accordingly to the url or the browser to go to an url after the query?
  11. How do you access your mysql database? With PHPMyAdmin?
  12. Hey Never done this before, but have a look this. Might help http://www.mysql.com/doc/en/Table_locking.html
  13. \"SELECT * FROM table_name WHERE issue_number != 555\"; Replace 555 with variable that holds the current issue_number. \"SELECT * FROM table_name WHERE issue_numer != $current_issue\";
  14. To delete an entire database: DROP DATABASE IF EXISTS db_name To create a new database: CREATE DATABASE IF NOT EXISTS db_name See also www.mysql.com for documentation on MySQL.
  15. Thanks for your help It worked great
  16. When inserting this integer: 000050007000003 from a form in php this is how it looked after being inserted: 000004294967295. This is the structure of the table: CREATE TABLE `kundekort_prosjekt_relation_kundekort` ( `id` int(11) NOT NULL auto_increment, `prid` int(11) NOT NULL default \'0\', `kid` int(15) unsigned zerofill NOT NULL default \'000000000000000\', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=10 ; I\'ve even tried inserting 000050007000003 manually with phpMyAdmin with the same result as described above. Anyone has any suggestions to why this is occuring? Im pretty close to start chewing on my fist.. :evil:
×
×
  • 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.