Search Posts

Make phpbb mysql query display all posts in a topic

…as opposed to what it is doing at the moment, which is display the last reply from EACH topic in the speicified forum. <?php // How Many Topics you want to display? $topicnumber = 10; // Change this to your phpBB path $urlPath = “../path/to/forum”; // Database Configuration (Where your phpBB config.php file is located) include ‘../path/to/forum/config.php’; $table_topics = $table_prefix. “topics”; $table_forums = $table_prefix. “forums”; $table_posts = $table_prefix. “posts”; $table_users = $table_prefix. “users”; $link = […]

Update records greater than today’s date and time for table where DueDate and DueTime fields are different columns

I’ve a table that looks somewhat like this CREATE TABLE Foo ( UserAction VARCHAR(20), JoiningDate DATETIME, JoiningTime TIME ); And it consists of following records: UserAction JoiningDate JoiningTime ———- ——————- ————- Pending 2018-01-15 00:00:00 16:00:00 Pending 2018-01-16 00:00:00 16:00:00 Pending 2018-01-16 00:00:00 20:00:00 Pending 2018-01-17 00:00:00 16:00:00 Now I want all records where JoiningDate is 2018-01-16 or above and JoiningTime is 18:00:00 or above. So I’ll write these queries: SELECT * FROM foo WHERE JoiningDate […]

unable to access mysql database with no password to git

I am trying to access github database from the terminal and I am getting this error. Any suggestions? Below is the link for accessing the database. http://ghtorrent.org/mysql.html ssh -L 3306:web.ghtorrent.org:3306 [email protected] Enter passphrase for key ‘/Users/abc/.ssh/id_rsa’: bind: Address already in use channel_setup_fwd_listener_tcpip: cannot listen to port: 3306 Could not request local forwarding. PTY allocation request failed on channel 0 on the other terminal 2 mysql -u ght -h 127.0.0.1 ghtorrent ERROR 1045 (28000): Access denied […]

The statement appears saying incorrect login or password even though i successfully logged in [duplicate]

This question already has an answer here: When to use single quotes, double quotes, and backticks in MySQL 10 answers How to get mysqli error in different environments? 1 answer Reference – What does this error mean in PHP? 30 answers Every time i log in successfully the message incorrect log in and password appears as well as the logged in message. I dont know where im going wrong $query = “SELECT ‘username’, ‘password’ FROM […]

data is not coming from DB even there is data in the table, ORM is Dapper

I am facing a strange issue, i am not sure what happened to code, it was working perfectly yesterday. I have data in table and am using below function to retrieve it from DB. i am using My SQL. when the application is started the data fetch correctly, but once we hit few times to DB for some tractions like save/update/delete. it stops to fetch records from DB or you can say it stops communicate […]

How to zoom an image retrieved from MySql database

Successfully retrieved images from mysql server in a list view. This works fine if I add a drawable image in this line zoomImageFromThumb(thumb1View, R.drawable.logo); What I need is that the image present in the ImageButton should dynamically zoom out. This is my Gallery.java activity public class Gallery extends AppCompatActivity { private ArrayList<GalleryListItems> itemsArrayList; //List items array private MyAppAdapter myAppAdapter; //Array adapter private ListView listView; //ListView private Boolean success = false; //Boolean private ImageButton imageUrl; private […]

MySql 5.6 search in polygon doesn’t work

I have a following table: CREATE TABLE test_countygeom (county_id INTEGER, g POLYGON); and some data within: INSERT INTO test_countygeom (county_id, g) VALUES(5, ST_PolyFromText(‘POLYGON(( 59.88232225518 15.809326171875, 60.19506356948 16.600341796875, 60.53729138216 18.2373046875, 60.16774850830 19.281005859375, 59.43837230099 19.698486328125, 58.60718904842 18.358154296875, 59.16917219094 15.545654296875, 59.88232225518 15.809326171875 ))’) ); When I’m trying to get county_id which is related to this polygon I always gen nothing. SELECT county_id FROM test_countygeom WHERE ST_CONTAINS(test_countygeom.g, ST_POINTFROMTEXT(‘POINT(59.566818, 17.972180)’)) But in this case I suppose to get 5 in […]

MySQL data structure for questions needing multiple inputs to be true

Apologies for the title as I’m a bit unsure how to phrase this myself so hopefully an example might help. I’ve got a MySQL table that holds questions question_id, PK Int text – Text I also have a table called value that looks like this value_id, PK Int value – varchar Basically, given a single or multiple value_ids I want to pick the question that should be asked so if I am given value_ids 1,2 […]

form code for Sending Combobox data to MySQL table

This is my form code for Sending Combobox data to MySQL table : <div id=”wb_Form2″ style=”position:absolute;width:311px;height:282px;”> <form name=”Team_Management” method=”post” action=”<?php echo basename(__FILE__); ?>” enctype=”multipart/form-data” id=”Form2″> <input type=”hidden” name=”TeamSystem” value=”TeamSystem”> <input type=”hidden” name=”TeamStrategy” value=”TeamStrategy”> <input type=”hidden” name=”TeamTactic” value=”TeamTactic”> <button id=”AdvancedButton1″ type=”submit” name=”Team_Management” value=”Team_Management” style=”position:absolute;left:99px;top:181px;width:144px;height:34px;z-index:2;”><div style=”text-align:center”><span style=”color:#000000;font-family:Arial;font-size:13px”>Save</span></div></button> </form> </div> but it doesn’t store “TeamSystem” “TeamStrategy” “TeamTactic” information on the MySQL table! This is screenshot of my form : https://ibb.co/cEciSR what is the issue in my code ? […]

Next Page »