paul2463
-
Posts
955 -
Joined
-
Last visited
Never
Posts posted by paul2463
-
-
if the column was float(6,2) that should do it for you
-
I used this in one of my sites and the pop up window opened in the middle of the page
function PopupMe(num){ myleft=(screen.width)?(screen.width-800)/2:100; mytop=(screen.height)?(screen.height-600)/2:100; settings='top=' + mytop + ',left=' + myleft + ',width=500,height=400,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,fullscreen=no, titlebar=no' var address = "designmode.php"; //put this in for you popupwin=window.open(address,'', settings); popupwin.focus(); }
then call the function onClick
-
thye only way you can do that is to stipulate the height and width of the window, work out the minimum size the window has to be ot show all the information then use those sizes when you create the window
onClick = "window.open('designmode.php', '', 'chrome=yes, resizable=yes,width=350,height=250')
-
when you wrote the function you stipulated that you would supply it with $menu
function get_menu_id($menu) {
and when you call it you dont give it that information
echo get_menu_id()
it fails because it wants to know what $menu is, you dont use it in the function anyway so I am confused as to why you want it
-
what is the datatype for the column you are adding the date too????
-
it is telling you that the query cannot run because the variable $user does not exist
try echo out the query instead of running it and see what I mean
try
$update = "UPDATE `user` SET `weight` = 'weight' + $weight WHERE `username` = '$user'"; echo $update;
you will find that there is no information for $user
-
SELECT * FROM news WHERE title LIKE '%".$_GET['q']."%' OR content LIKE '%".$_GET['q']."%' AND pageid = 3496 ORDER BY pageid DESC LIMIT 10
-
you could try and change the check line to read
if (XMLreq)
because the "if" statement returns either true or false, if the item exists the it is true (code above) if it does not exist then it will fail
-
when I first started ( and in fact I still do ) i installed and use <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>. It installed everything I needed to get going, PHP, MYSql, and Apache server. it also installed PHPMyAdmin which is a graphical interface for creating and editing tables. it comes with installation instructions and everything to get started I believe
regards
paul
-
-
you could change this line
$data.= "\")";
to
$data.= "\") or die ("error in query " . mysql_error))";
and see what errors come up, i think the main problem will be in the following code
$data = "mysql_query(\"SELECT * FROM music WHERE"; if ($composition != "") { $data.= " composition LIKE '$composition'"; } if ($origin != "") { $data.= " AND origin LIKE '$origin'";
if you have a composition and an origin your query string will be
SELECT * FROM music WHERE composition LIKE blah AND origin LIKE blah "
whereas if you dont have a composition but have an origin your query string will be
SELECT * FROM music WHERE AND origin LIKE blah "
and will fail big style
HTH
-
I kno wnothing about AJAX, you are wondering why I am answering here then, I will try and explain using a small amount of programming knowledge
I have been looking around on the web for information....
1. xxx.open is a function call, that is fact
2. for your function to fail it must be that your XMLreq is not an object that .open works with...
3. this tells me that it was not created properly in the first place.
4. something has to be there or the "!= null" would have failed
5. I cant seem to find a function call named "new AJAX()", I have found a xmlReq = new XMLHttpRequest(); ..
I might be way off but thats what I thought ....
-
$newstring = substr($oldstring,0, 200);
-
<?php function Encrypt($text) { $length=strlen($text); for ($i = 0; $i < $length; $i++) { $char = ord($text[$i]); //gets the ascii character number of the letter $char1 = chr($char +1); //adds 1 onto the ascii charachter a=b f=g etc $output .= $char1; //remakes the string } return $output; } $text = "hello world"; echo Encrypt($text); //prints out ifmmp!xpsme ?>
rewrite it slightly to decrypt the line by making it minus1
-
echo $err; $multivar = func("blah"); function func($func) { $returnArray[0] = "bar"; $returnArray[1] = $func; return $returnArray; } echo $multivar[0]; //prints out "bar" echo $multivar[1]; //prints out "blah"
HTH
-
= assigns a value to a variable...
== checks to see if two values are equal
=== checks to see if two things are exactly the same value and type
in an if statement you are checking for equality and not assignation - use == not =
HTH
-
$query = "Blah blah blah"; $result = mysql_query($query) or die ("Error in query " . mysql_error()); $rows = mysql_num_rows($result); if ($rows < 1) { echo "Oops no rows returned"; } else { blah blah blah echoing out your data }
hope that helps
-
try this
<?php $sql = "SELECT * FROM articles"; $run = mysql_query($sql) or die ("error in query " . mysql_error()); //just in case you query is duff while($data = mysql_fetch_assoc($run)) { echo "<a href=\"index.php?p=articles&name=".$data['name']."\">".$data['name']."</a>"; } ?>
if you are using fetch_array you have to use the numbered key of the data you wish to get (i.e $data[1]), using fetch_assoc allows you to use the name of the column for the data(i.e $data['name']), but either way unless you use $data it wont understand you are calling for information from an array object
hope that helps
-
ok here we go, will try for you
array('First Name'=>$row['FirstName'],'Last Name'=>$row['LastName']);
means
1. create an array object
2. lets say that $row['FirstName'] is "Fred"
3. create a key called 'First Name' and make the value of that key equal Fred (that's what => means)
-
if it works how you want it can you click the "SOLVED" button?
-
the whole idea is to reduce the size of data that is stored, if you have 5 tables that are normalised and dont produce any duplicated information then it is quite all right to use a query that joins the five tables to get the dynamic information
-
if (mail($target_address, $subject, $message, $headers)) { header('Location: thankyou.html'); exit; }
-
I have just been playing with it as it was printing the data twice for me too until i changed this line
while($question = mysql_fetch_array($questions_datasource))
to
while($question = mysql_fetch_assoc($questions_datasource))
might be worth a go
-
it could be if you have set your due_date column as a datetime then it will be expecting it to come at it in the format yyyy-mm-dd, you could try
$sql = "INSERT INTO invoices SET client_id='$_POST[c_id]', service_name='$_POST[s_name]', total_price='$_POST[t_price]', current_date='$date' , due_date=DATE_fORMAT('$_POST[d_date]' , '%Y-%m-%d')";
[SOLVED] Stupid LEFT JOIN not working
in PHP Coding Help
Posted
you could try this
note the double quotes arround the query string and single quotes around the php variable
print_r($iteminf); should tell you whats exactly in the returned array