I'm working on Windows with Apache and PHP.
I just installed MySQL, configured it, and started it.
But when I run
<?php
phpinfo();
?>
I don't see the mysql section, which means that I cannot use MySQL commands in the PHP code, right ?
Why is that ?
Should I do any manual connection between MySQL / PHP / Apache ?
...
guys, i have these codes for updating the records in the database.
please.. check if these is correct?
<?php
session_start();
include "db.php";
$username = $_SESSION['username'];
$query="SELECT * FROM members where username='".mysql_real_escape_string($username)."'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysq...
One of my clients has an issue with his MySQL database. To solve the issue I need to just run a simple update on a table. I will need to send that to my client via a batch file.
How do I run a MySQL update on a table via a batch file?
...
This is my tables, the AUTO_INCREMENT shows the size of each:
tbl_clientes:
CREATE TABLE `tbl_clientes` (
`int_clientes_id_pk` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`str_clientes_documento` varchar(255) DEFAULT NULL,
`str_clientes_nome_original` char(255) DEFAULT NULL,
PRIMARY KEY (`int_clientes_id_pk`),
UNIQUE KEY `st...
Is there an alternative for LIKE. Note I cannot use FULL TEXT Search.
Here is my mysql code.
SELECT *
FROM question
WHERE content LIKE '%$search_each%'
OR title LIKE '%$search_each%'
OR summary LIKE '%$search_each%'
...
I am writing a java class which handles database in mysql
i want to connect mysql through eclipses
...
I have a table with 4 columns: place_id, username, counter, last_checkin
I'm writing a check-in based system and I'm trying to get a query that will give me the "mayor" of each place. The mayor is the one with most check-ins, and if there is more than 1 than the the minimum last_checkin wins.
For example, if I have:
place_id, username...
I want to select all the rows in my database but I want them in inverted sequence. Meaning, I want to use the first column data as the new entities and present entities as the first column. I think you got what I mean
Here is an illustration
id | name | marks
-------------------------------
1 | Ram | 45
----...
Here is sample query
SELECT
name,
sum(SELECT id FROM mytable WHERE cond='1' and cond2='2') as mysum1,
sum(SELECT id FROM mytable WHERE cond3='3' and cond4='4') as mysql2
FROM
mytable
WHERE
userid='1' and status='1';
Obviously this does not work but I think you can now understand what I mean. How to retrieve ...
guys, how can i set the auto_increment of my userid something like this:
i want to start it in 200, then increment by 10 with a maximum value of 1000..
how will i code it using php?
please help me.. :-(
...
I'm looking at making a booking system and I need to display all the available users on a particular day/time.
Thinking about it, I'm going to set up a table to keep note of when people AREN'T available, and assume that they are otherwise available. The structure I had in mind was to keep a note of the date_start of when they won't be a...
Hello,
suppose i have an javascript array "userName".I want to load it from a database table named "user".
Can anyone help with idea or sample code?
Thanks
...
I want to update a column col in table tab,whose data is like follows(comma separated, with the heading comma):
,test,oh,whatever,....,
Which can be too long to display,how can I update the column so that only the first 10 words are left?
...
Hello, I am currently trying to read from an xml file which records the jobs on a PBS. I have succesfullly managed to parse the code, but am unable to insert the objtects into my database, i receive this error:
"You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred...
Hi guys!
Does anybody know how to do smart database update in realtime.
E.g. I have a site with a great database. Suddenly I've made some code changes and database structure and data changes. Is there any standard plan to do it with deploy script or any deploy soft? In realtime without stopping the site?
E.g. switch between two clone...
I have 2 tables in a mysql database : users and pets. In the users table there is a field that contains a semicolon separated list of the pets that a user has (pet_ids = 1;2;3;4;). These ids correspond to unique ids (keys) in the pets table which contain the pet name (1 = rex, 2 = goldie, 3 = squeak, 4 = bubble).
I want to present a lis...
i has a table:TestTable, this table only has one field: value,i insert same datas:
value
------------
ccc
aa
111
bbb
------------
i run:
select * from TestTable
can show my result order by:
ccc
aa
111
bbb
now,i want get this result DESC:
bbb
111
aa
ccc
how to create this sql?
select * from TestTable order by (by what?) DESC
...
I have a table
EntryLog(Name String, CheckIn Boolean)
I want to count the number of checkins against each name. How do I write a query to get the result as a single resultset?
...
Hi,
Got a question about Entity Framework and MyIsam tables.
My production database consists of MyIsam tables only. Often with a primary key like UserId and then a secondary KeyId that is auto incrementary.
Since secondary auto incremantary keys are not allowed in InnoDb, and there will be ALOT of work to get rid of them before convert...
I work on a ticket system in PHP/MySQL.
We have implemented mysql FTS in boolean mode, to provide the search feature to users.
User enters search string and we present her a list of issues.
Below is the sample database schema:
issues table - (id, title, description)
It has fts index (title, description)
issue_comments table - (id, is...