Jump to content

Recommended Posts

I need to modify this code i'm working with so im pulling a certain row and not the whole table.  Can anyone help?

 

<?php

define("STR_RELATIVE_PATH", "");

require STR_RELATIVE_PATH . "_includes/_database.php";

db_connect();
db_select();

$strQuery				= "SELECT * FROM tblServices ORDER BY intID ASC";
$queryGetServices		= db_query($strQuery);

?>

Link to comment
https://forums.phpfreaks.com/topic/197037-modify-select-from/
Share on other sites

<?php



define("STR_RELATIVE_PATH", "");






require STR_RELATIVE_PATH . "_includes/_database.php";



db_connect();



db_select();



$strQuery








//Rename column to the column you are searching, and the value is self explanatory.
= "SELECT * FROM `tblServices` WHERE `column` = 'value'"; //You don't need an ORDER BY if you are only pulling one row.



$queryGetServices





= db_query($strQuery);




?>

Link to comment
https://forums.phpfreaks.com/topic/197037-modify-select-from/#findComment-1034369
Share on other sites

 

You rock man, thank you for the help, worked perfectly!

 

<?php



define("STR_RELATIVE_PATH", "");






require STR_RELATIVE_PATH . "_includes/_database.php";



db_connect();



db_select();



$strQuery








//Rename column to the column you are searching, and the value is self explanatory.
= "SELECT * FROM `tblServices` WHERE `column` = 'value'"; //You don't need an ORDER BY if you are only pulling one row.



$queryGetServices





= db_query($strQuery);




?>

Link to comment
https://forums.phpfreaks.com/topic/197037-modify-select-from/#findComment-1034371
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.