The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
56 views

Database update rather than cycle through? [closed]

I'm new when it comes to MySQLi and databases so I'm not sure how exactly to title this question. I have a PHP script setup to where it inserts data into the database. Pretty self explanatory. ...
1
vote
1answer
147 views

Cannot change root access in MySQL to %

This is a new MySQL Server install. I created my root password as part of the setup (on Centos 6.4). When I connect to the server through a terminal, I can connect to MySQL and issue commands, using ...
0
votes
0answers
98 views

mysqlnd: same mysql server and php version, can't connect from Windows

(This question is also in StackOverflow http://stackoverflow.com/questions/16575994/mysqlnd-same-mysql-server-and-php-version-cant-connect-from-windows) I'm migrating mysql functions to mysqli. As ...
2
votes
0answers
88 views

Changing Charset to utf8 for all the fields and tables in mysql

How should I use the mysql and awk to change the charset for all the fields and tables for a specific database? I did not include username or password, so for sure it will not work. Should I run it ...
1
vote
1answer
194 views

MySqli - select from db based on time difference with CURTIME() or SUBTIME()

I have a db with some customers data. There I store their last login time as datetime. I want to run a cron php script every min which will query mysqli for their last login datetime and if that was ...
3
votes
2answers
383 views

Should I use select count(*) for counting records or having a field like comments_no for tables like post, comments?

In my recent project which is about social networking for an Asian country, I'm in doubt whether I use the below SQL statement for counting records: SELECT COUNT(id) shareLikeNo FROM ...
1
vote
2answers
203 views

how to get count(*) from table which either has column or not?

I have a post table as below: CREATE TABLE `post` ( `p_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `user_id` smallint(5) unsigned NOT NULL, `cat_id` tinyint(3) unsigned NOT NULL, ...