The mysqli tag has no wiki summary.
0
votes
0answers
28 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
39 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 ...
0
votes
0answers
139 views
PHP - Binding results of an mysqli query to an associative array
I'm trying to retrieve the results of a query using mysqli and put them into an associative array. After searching online I found this post:
...
1
vote
1answer
100 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
292 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
161 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,
...
