TCP server (php)
I have a gps simulator, which sends continuous location data (nmea strings) through tcpip to 192.168.0.178:2323. How do I get that data using tcp socket and write to DB (php & mysql)? Thanks! ...
I have a gps simulator, which sends continuous location data (nmea strings) through tcpip to 192.168.0.178:2323. How do I get that data using tcp socket and write to DB (php & mysql)? Thanks! ...
What's the best way to handle the Rails database.yml if multiple people are working on the project and database locations are different (the socket in particular). ...
I am working on an an application that allows a user to search for a particular book on Amazon using a given search criterion (e.g. title, keyword, author.) I am currently attempting to store these search results to a MySQL database, but am struggling with the concept of relationships. It seems natural that I would structure the models ...
PROBLEM: Ok, I've been TRYING to follow the sample code on the MySQL Forge Wiki and some other websites that offer a tutorial on how to get a simple database connection, but for some reason, my project always fails at a linking error and I can't figure out why or how to fix it myself (I'm still learning). PLEASE HELP ME! I've included t...
Is script 1 safer? "; } else { queryMysql("CREATE TABLE $name($query)"); echo "Table '$name' created"; } } function tableExists($name) { $result = queryMysql("SHOW TABLES LIKE '$name'"); return mysql_num_rows($result); } function queryMysql($query) { $result = mysql_query($query) or die(mysql_error()); return $result; } ...
Hello, I've got a menu, that is something like this: <ul id="menu_cat"> <li><a class="cat1" href="#">category 1</a> <ul> <li><a class="cat2" href="#">category 2</a> <ul> <li><a class="cat3" href="#">category 3</a></li> <li><a class="cat3" href="#">category 3</a></li> <li><a class="...
Hi, I'm currently developing a website that is gonna show stuff for almost any language in the world. And im having problems choosing the best collation to define in the mysql. Wich one is the best to support all characters??? Or the most accurate??? Or is just best to convert all characters to unicode? thanks ...
Okay i know i can do this in the application layer, which is probably the easiest thing to do, but just to make sure that no errors water down to the DB, i have a serious question I have two columns X and Y, each to store two integers (either A or B in any of the columns). Is it possible to have a unique index constraint such that, in n...
Hi, i'm indexing strings containing URL's in MySQL Fulltext... but i dont want the urls included in the results. As an example i search for "PHP" or "HTML" and i get records like "Ibiza Angels Massage Company see funandfrolicks.php"... a hedonistic distraction at best. I can't see examples of adding regular expressions to the stop word...
Hi I have following db structure: File, User, FileRevision (has foreign key to File, and many-2-many connection through intermediate table to User). I want to fetch all FileRevision-s that: are newest/freshest in their corresponding File-s, have many-2-many link to User that performs search (permission checking). I found out that...
Just a quick one: Will SELECT ... WHERE name LIKE '...' query be faster if name column is ASCII rather then UTF-8? Thanks! ...
I've got problem with dropping foreign key index, I always get the same error ALTER TABLE `comments` DROP INDEX `id_user` which outputs 1025 - Error on rename of './postuj_cz1/#sql-d834_a0c704' to './postuj_cz1/comments' (errno: 150) The id_user on the other table is simple primary key index. I'm using MySQL version 5.0.85 ...
Such as this one: SELECT id, count( * ) , company FROM jobs GROUP BY company Where id is the primary key of jobs ...
I need to handle continuous data through TCP and write it to database. I use the following code (suggested by ZZ Coder): <?php $fp = fsockopen ("192.168.0.179", 2323); if (!$fp) { die ("$errstr ($errno)"); } if ($fp) { $user="root"; $password="12345"; $database="db_name"; mysql_connect('localhost',$user,$password...
Let me put my issue defining a real scenario: I am using dedicated server where PHP and MySQL are available. My PHP include_path=/var/local/php I am developing a custom cms application, where I am writing my own library which is responsible for communicating with the database and retrieving data based on some key. My application is g...
I'm using memcache to cache database objects, for example user rows. when a user row does not exist, I would like to create an 'empty' database object, similar to the one mysql would return for a user query, fill it with data and use it. I don't want to create a new database row for the new user at this point. (it will be created at lat...
I'm working on building a forum with kohana. I know there is already good, free, forum software out there, but it's for a family site, so I thought I'd use it as a learning experience. I'm also not using the ORM that is built into Kohana, as I would like to learn more about SQL in the process of building the forum. For my forum I hav...
Hello, I am newly using Apache Tomcat6.0 I am unable to access sql database through my jsp and getting java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver Tried steps at http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html downloaded drivers mysql-connector-java-5.1.9 and mysql-5.0.85-w...
Is there a tutorial that will show you how to code your own PHP script that will display your most recent registered members? ...
I am trying to modify a database Migration in a Ruby on Rails application. I am using MySQL as my database and would like to add foreign keys to the table that is being created. I am using the following code and while the specifications for creating null values on appropriate columns is being followed no foreign key constraints are being...