10,940 Topics

Member Avatar for
Member Avatar for Ventech_IT

Hi there, I have a little bit of a problem, i keep getting the following message when i try retrieve info from my database: "mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given" Here is my PHP code i don't see the error could someone please help? <?php require("connect.php"); //Check …

Member Avatar for cereal
0
210
Member Avatar for vinctham91

I'm creating an Web-Based Inventory System, currently stucked at this module where I need to scan QR code. The process flow that I want to achieve should be like this: 1. Scan QR code containing the inventory ID wirelessly using an Android app 2. Show the information retrieved from the …

Member Avatar for diafol
0
197
Member Avatar for mutahirpirzada

hp $mysql_hostname = "localhost"; $mysql_user = "root"; $mysql_password = ""; $mysql_database = "farm_house"; $prefix = ""; $bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database"); mysql_select_db($mysql_database, $bd) or die("Could not select database"); $myysql= "SELECT customerinformation.CustomerFullName, customerinformation.CustomerID, customerinformation.Housenumber, customerinformation.Sector, customerinformation.StreetNumber, customerconsumption.MilkDelieveredCow, milkrate.CowMilkRate, (customerconsumption.MilkDelieveredCow*milkrate.CowMilkRate) AS t_amount_cow, customerconsumption.MilkDeliveredBuffalow, milkrate.BuffaloMilkRate, (customerconsumption.MilkDeliveredBuffalow*milkrate.BuffaloMilkRate) AS t_amount_buff, …

Member Avatar for Bin_2
0
5K
Member Avatar for berserk

Table: numdata id numb 1 123 2 456789 3 123 4 456789 5 123 6 456789 7 123 8 456789 9 123 10 456789 11 123 12 456789 13 123 14 456789 ...... What i would like to do is combine the data in numb only, so the desired data …

Member Avatar for diafol
0
393
Member Avatar for garyrichard

I am retriving image from mysql database and want to hyperlink this processed image but not able to find solution for ($i = 0; $i < $rows; $i++) { $description = mysql_fetch_array($result); $img_str= base64_encode($description["nImage"]); echo '<a id="zoom" href="data:image/jpeg;base64,'.$img_str.'"><img src="data:image/jpeg;base64,'.$img_str.'" width="150" height="150" /></a>'; if($i%3 == 2) echo "</br>"; }

Member Avatar for cereal
0
2K
Member Avatar for jKidz

Hi friends, In my site, simply I want to save the configuration data, site details in the php file. For an example, in vBulletin they are using config.php file to save all the general details. // ****** DATABASE TYPE ****** // This is the type of the database server on …

Member Avatar for jKidz
0
192
Member Avatar for Bin_2

hi all! it might look similar to previous question but actually different.. i'm trying to calculate stock value. for this i want to use "average last purchase value" of item. like if closing stock is 14 and purchase detail is like this 2014/2/2 15pc @ 38000 2014/2/15 5pc @ 36000 …

Member Avatar for Bin_2
0
2K
Member Avatar for Nikhil_4

This code was to create a simple database with a table and add records with the following. toIm having trouble with the 'id' auto_increment. <?php $con=mysqli_connect("localhost","root","distortion","my_databs"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } // Create table $sql="CREATE TABLE empl(ID INT NOT …

Member Avatar for andrevanzuydam
0
4K
Member Avatar for gandrap

I have two tables with column name price I want to order by price from both columns so if is in first table 100eur and in second is 200eur I want to order results like this: 200, 100 SELECT a.price, b.price FROM table1 AS a INNER JOIN table2 AS b …

Member Avatar for urtrivedi
0
260
Member Avatar for jKidz

Hi All, As usual I here with a PHP & MySQL problem. Most of you know, I am developing Music Download system. Today I have created Widget to display last 5 songs. <?php include('datab.php'); $get = "SELECT * FROM `songs` ORDER BY `id` DESC"; $getres = mysql_query($get) or die(mysql_error()); if(mysql_num_rows($getres)> …

Member Avatar for hericles
1
186
Member Avatar for garyrichard

<?php $host = "localhost"; $usr = "root"; $pwd = ""; $db= "DB"; conOpen($host,$usr,$pwd,$db); function conOpen($host,$usr,$pwd,$db){ $con=mysql_connect($host,$usr,$pwd) or die ("Connection Failed "); mysql_select_db($db,$con);} $rows_per_page=5; // database connection stuff here $result=mysql_query("Select * from newsimage"); $pages=ceil(mysql_num_rows($result)/$rows_per_page); if (!isset($screen)) $screen = 0; else echo $_GET[screen]; /* $start = $screen * $rows_per_page; $sql = "SELECT …

Member Avatar for Borzoi
0
1K
Member Avatar for calinaguiluz20

Hey guys I'm new on web development, I'm just started with php and mysql , I've been using php for a couple of months,, thanks !:)

Member Avatar for veedeoo
0
37
Member Avatar for nadiam

Hi guys. i have an event page that displays events from database. in my database I have a column with datetime format. is there a way to only get the date or time separate from each other in a select to be displayed? php: <?php require "connection.php"; $sessid = $_SESSION['sess_user_id']; …

Member Avatar for nadiam
0
2K
Member Avatar for filipgothic

I have error with this line while($row = mysql_fetch_array($pregled)) in line 42 here is part of code that has problem, can anyone check this out? I need to fix this as soon as possible thanks in advance <p align="center"><font color="#0000FF">Pregled grupa</font></p> <p align="center">Grupa kojoj koncert pripada: <select name="grupa_select2" id="grupa_select2"> <?php …

Member Avatar for filipgothic
0
226
Member Avatar for aseel_1

Suppose I have a tow SQL tables: Fathers id | name ------------- 1 | Clinton 2 | Gates 3 | Bush 4 | Clinton Sons id | fatherid | name --------------------- 1 | 1 | bill 2 | 1 | suzy 3 | 2 | mera 4 | 2 | …

Member Avatar for filipgothic
0
209
Member Avatar for berserk

I am unable to get my text file data.txt to read correctly into my database. This is what my text file looks like 9889483782,6068378394,6069437364... and so on for like 50 numbers I have to get each of the comma seperated values to show up in the database, id like them …

Member Avatar for redalert19
0
513
Member Avatar for AdventDeo

Okay I hope my title is not confusing. I have two checkboxes names Delete[] and Update[] followed by a textbox named Name[]. When I tick checkbox Delete[] and click Submit, I ran a query to delete the data based on that Checkbox's value (which I have set to be the …

Member Avatar for laljaseh
-1
2K
Member Avatar for Bin_2

i made union to two mysql tables select cashid, sum(amt) as ramt, NULL AS pamt from receipt where cashid in ('17', '23') GROUP BY cashid union all select cashid, NULL AS ramt, sum(amt) as pamt from payment where cashid in ('17', '23') GROUP BY cashid and now i want to …

Member Avatar for urtrivedi
0
226
Member Avatar for Bile

->Hi,I hope all is well. Here is what I have difficulties with, I am NOT good in Java Scripts and I wanted to have a Slide show Image on My Page and lucky was I to find these fancy slide shows [here](http://www.dynamicdrive.com/dynamicindex14/shockwave/index.htm). I downloaded necessary associated files and the whole …

Member Avatar for Bile
0
878
Member Avatar for Ryan_11

I have three tables i want to search for customer data depending on the equipment type. $test = "SELECT custid, equipment FROM customer WHERE custid='$id'"; $data = @mysqli_query ($dbcon, $test); $equip = mysqli_fetch_array($data, MYSQLI_ASSOC); if($equip['equipment'] = "cellphone" ){ // Make the query: $q = "SELECT custid, cdate, custName, customer.equipment, customer.manufacturer, …

Member Avatar for Topnews
0
285
Member Avatar for aseel_1

Hi all why this code doesn't work correctly but php validate without js work correctly and js without php validate work correctly ?! form.php <html> <head> <title>Registration Form</title> <script language="JavaScript" type="text/javascript"> Function validate () { var str=true; document.getElementById("name").innerHTML=""; document.getElementById("username").innerHTML=""; document.getElementById("pass1").innerHTML=""; document.getElementById("pass2").innerHTML=""; document.getElementById("email1").innerHTML=""; document.getElementById("web").innerHTML=""; if(document.frm.nameTxt.value=='') { document.getElementById("name").innerHTML="Please Enter your name"; str=false; …

Member Avatar for aseel_1
0
313
Member Avatar for network18

Hello, I am installed php 5.3.28 with apache 2.2 and mysql 5.5.38 on windows 64 bit machine, despite configuring php correctly with apache and also enabled the extensions, its not able to recognise the mysql extension loaded. The connection attempt through adodb throws the error "call to undefined function mysql_connect() …

Member Avatar for network18
0
662
Member Avatar for Ehsan_3

Can anybody help or point me in the right direction what is missing on my code. The postcode is a mysql table and one field stores user's choice of postcodes in the form of array(a,b,c,d and etc....) Now I want to load selectedPostcode in checkboxes for user_id = 2 to …

Member Avatar for Ehsan_3
0
247
Member Avatar for jKidz

Hi Guys I wrote simple PHP script for get value from URL and check similar values from the database. This is a code <?php include('../../datab.php'); if(!empty($_GET['ip'])) { $ip = $_GET['ip']; $ipcheck = mysql_query("SELECT * FROM `report` WHERE `ip`='$ip'"); if(mysql_num_rows($ipcheck)> 0) { while($row = mysql_fetch_array($ipcheck)){ ?> <body> <p>Report ID : <?php …

Member Avatar for jKidz
0
254
Member Avatar for showman13

OK, I have the following regulare expression for phone number validation, but it doesn't really do EXACTLY what I want... What I want to see is a forced format 000-000-0000 where it needs to be entered with the area code-prefix-suffix including the dashes. I store it in a varchar field …

Member Avatar for AndrisP
0
771
Member Avatar for dapcigar

Hello all, Am trying to display records from mysql using HIghchart but for some reasons, it is not bringing out any output, please help me look into my codes. :::::::::::::::::::::::::::::::::::::data1.php :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: <?php include('mysql_connect.php'); $dept = $_POST['department']; //include('mysql_connect.php'); $stat = 'paid'; $result = mysql_query ("select category, amount, actual from budget where …

Member Avatar for naui95
0
280
Member Avatar for Ventech_IT

Hi guys having a little problem getting my brain wrapped around this, im new to php and need some help, on my homepage i have a product spotlight container. In this container i would like to pull information from a table in my database and display the relevant content. I …

Member Avatar for tapananand
0
421
Member Avatar for Ventech_IT

Hello, I'm new to php mysql and would like to ask if someone can point me in the right direction for a script or tutorial that could explain to me how to achieve the following. I have a page that is called "page.php" now when i click a link it …

Member Avatar for tapananand
0
235
Member Avatar for EchoSeven

hello. my MySQL database corrupts the database when ever i start, stop, or restart the service. i am on a laptop.. and this is for testing.. so, i have to stop the server to be able to do other kinds of work and take my laptop to school, work, and …

Member Avatar for EchoSeven
0
588
Member Avatar for AndrewDBrown

I am having trouble saving dates to my MySQL database (code below) C# var abook = db.egw_addressbook.Local.FirstOrDefault(o => o.contact_id == 16875); abook.org_name = mvm.org_name; abook.hex_srv_start = mvm.hex_srv_start; db.SaveChanges(); MessageBox.Show("Saved"); XAML <DatePicker x:Name="Txthex_srv_start" SelectedDate="{Binding hex_srv_start}" HorizontalAlignment="Left" Height="26" Margin="10,55,0,0" VerticalAlignment="Top" Width="111" /> If I make any changes to the date, I get …

Member Avatar for AndrewDBrown
0
224

The End.